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,



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

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



  • 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.



  • 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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.