Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Call a Qwidget outside of a non QT app
Forum Updated to NodeBB v4.3 + New Features

Call a Qwidget outside of a non QT app

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
2 Posts 2 Posters 497 Views 1 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.
  • MassiM Offline
    MassiM Offline
    Massi
    wrote on last edited by Massi
    #1

    Hello,

    I have vs2012 dll project and I managed to integrate Qt5.4.1 library in it. I want to use QWidget to open a window or do wherever I want with it like in QtCreator but when I try to call it,

    void myfunction::callQt()
    {
            QWidget* mywidget = new QWidget;
            .....
    }
    

    I get a pop-up window saying:

    must construct a qapplication before a qwidget
    

    I know that I don't have a QApplication and I don't know how to create it in my dll? do you have any example?

    Thanks in advance!

    Massi

    Software Design Engineer at Ford - Canada

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

      Hi,

      I haven't used it but the QtWinMigrate module might offer hints about how to do it.

      Otherwise, there this stackoverflow post that could be interesting.

      Hope it helps

      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
      0

      • Login

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