Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate .h file out of qt .ui with visual studio 2008?

i only manage to find tutorials to generate in linux but can't find any guides for generating in windows so i can use for vs2008. anyone can help? thanks!

like image 863
craftace Avatar asked Nov 23 '25 04:11

craftace


1 Answers

Add your .ui files to the project, then right-click -> Properties. Under General->Item Type set Custom Build Tool. Under the left panel expand the Custom Build Tool goto General there set:

Command Line: "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"
Description: UIC'ing %(Identity)...
Outputs: .\GeneratedFiles\ui_%(Filename).h
Additional Dependencies: $(QTDIR)\bin\uic.exe

The % variables are new to VS2010 but basically search for the one with the full path of the ui file and the dir where you want the generated .h to be output. Make sure Outputs also filled out correcty so it gets cleaned up on clean.

like image 137
RedX Avatar answered Nov 24 '25 22:11

RedX



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!