November 15, 2011

feedmeqt feedmeqt
Lab Rat
34 posts

cannot create a QWidget when no GUI is being used. Then How should I create it?

 

Hi,

cannot create a QWidget when no GUI is being used, is the error throwing up when I try to use the COM object inside my QtCore application. Its, understandable that I dont want the UI component to be part of it, but when I do try to remove the QWidget from the COM object class the compiler just compalins?

So, is there any way I can create it, non -GUI?

Thanks,

3 replies

November 15, 2011

RazrFalcon RazrFalcon
Lab Rat
114 posts

Did you use QT += gui in yours .pro file?

You want to create exactly QWidget or program window, like QMainWindow/QDialog?

 Signature 

QT != Qt
Gentoo + KDE

November 15, 2011

zither zither
Lab Rat
147 posts

Trying to make QWidget without use of GUI class in Qt is impossible.

If you don’t want GUI use console. But If you want QWidget, you must use QtGui class.

November 15, 2011

feedmeqt feedmeqt
Lab Rat
34 posts

Hi,

Thanks for the reply.

Well, I’m using VS2010 and I’ve not included the GUI part. Now I’ve got some workable solution by deriving from the QObject which I need to test further.

Yes, its correct that I can’t use QWidget if not using GUI.

 
  ‹‹ How to find duplicates in QStringList      Valgrind hits in QString? ››

You must log in to post a reply. Not a member yet? Register here!