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. How to provide interface with Qt
Forum Updated to NodeBB v4.3 + New Features

How to provide interface with Qt

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 331 Views 2 Watching
  • 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.
  • Y Offline
    Y Offline
    Yoline
    wrote on last edited by
    #1

    Using Qt class can make my work easier. I want to implement c++ interface with Qt class. But I get error:

    QCoreApplication::applicationDirPath: Please instantiate the QApplication object first
    QCoreApplication::applicationDirPath: Please instantiate the QApplication object first
    QPixmap: Must construct a QGuiApplication before a QPixmap
    Process finished with exit code -1073740791 (0xC0000409)
    

    My guess is that QApplication is needed if you want to use Qt class.
    Is there a way to use Qt class without GUI and QApplication?

    JonBJ 1 Reply Last reply
    0
    • Y Yoline

      Using Qt class can make my work easier. I want to implement c++ interface with Qt class. But I get error:

      QCoreApplication::applicationDirPath: Please instantiate the QApplication object first
      QCoreApplication::applicationDirPath: Please instantiate the QApplication object first
      QPixmap: Must construct a QGuiApplication before a QPixmap
      Process finished with exit code -1073740791 (0xC0000409)
      

      My guess is that QApplication is needed if you want to use Qt class.
      Is there a way to use Qt class without GUI and QApplication?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @Yoline
      You need at least one inheritor of QCoreApplication, depending on what you use, to allow Qt infrastructure support. You can't use (the facilities you are trying to) without bothering to do this.

      1 Reply Last reply
      2
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi and welcome to devnet,

        If you want to use QPixmap you need to have at least a QGuiApplication created. The type of QXXXApplicstion object you need will depend on what you want to use.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        1

        • Login

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