PDA

View Full Version : can not crreate a qwidget when no gui is being used



weixj2003ld
25th May 2010, 08:58
I create a .pro file through " Qt->create Basic .pro File ..." in the qt-plugin for vs2005,when I use lupdate -vrebosse my.pro,the error ocurr:
can not crreate a qwidget when no gui is being used?
why?

high_flyer
25th May 2010, 11:43
Because you are using QCoreApplication and not QApplication.
If you are not making a GUI application it makes no sense to create a QWidget which is a GUI component.

weixj2003ld
26th May 2010, 02:11
thk u for your answer.
In my main function,I use

QAppliction a(argc,argv)

not

QCoreApplication a(argc,argv)

but problem still exists.

nikhilqt
26th May 2010, 06:38
Are you not getting any compilation errors?.Post those. It would be helpful to see the scenario.

jryannel
26th May 2010, 08:49
Can you post your my.pro file. Seems to have a strange setup.