PDA

View Full Version : Qt3 Designer complilation/linking



Nathan Leverington
22nd June 2007, 08:11
Hi all,

I have made a simple program that includes a mainformDlgBase.ui; mainformDlg.h and .cpp (subclass) and main.cpp that makes a simple connection and displays output in the command window when a button on the dialog is selected. The program works fine if all .h and .cpp files are created and/or added to the Qt Designer project.

However my problem is i am trying to only create my dialogs (.ui) files within the Qt designer and have all the other .h and .cpp files created within eclipse (ie for configuration management reasons) and i thought all i would be required to do is add the .h and .cpp files to the appropriate positions within the .pro file

ie SOURCE main.cpp \
bla.cpp \

HEADER bla.h \

When i dont add these files specifically within Qt designer (i.e. i just edit the .pro file manually and insert the lines provied above) i get the following error:

: In funciton '_start' :
init.c: ( .text+0x20): undefined reference to 'main'

obviously it is not picking up my main.cpp file that i have included to my .pro config file;

Does anyone know what else i need to do to be able to work outside Qt Designer and still use the .ui files?

cheers,

nathan.

Nathan Leverington
22nd June 2007, 08:26
Further on the post made above:

I found that when all the additional files are not residing within the Qt designer, and i have only manually added them to the .pro files (i.e. rather than creating and/or adding the to the designer) that when running qmake the files are not being included into the Makefile that is generated.

Is there some linkage that qmake does that doesnt just include the add the file names within the .pro config file?

jacek
22nd June 2007, 11:23
Does anyone know what else i need to do to be able to work outside Qt Designer and still use the .ui files?
It should work without any problems. Could we see your .pro file?

Nathan Leverington
25th June 2007, 08:24
Hi, thanks for the reply,

i eventually got it working, cheers