Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Cannot create a QWidget when no GUI is being used. Then How should I create it?

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

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 5.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    feedmeqt
    wrote on last edited by
    #1

    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,

    1 Reply Last reply
    0
    • R Offline
      R Offline
      RazrFalcon
      wrote on last edited by
      #2

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

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

      1 Reply Last reply
      0
      • Z Offline
        Z Offline
        zither
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • F Offline
          F Offline
          feedmeqt
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved