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. QDialog in an application without a QApplication
QtWS25 Last Chance

QDialog in an application without a QApplication

Scheduled Pinned Locked Moved General and Desktop
activex
4 Posts 2 Posters 1.7k 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.
  • G Offline
    G Offline
    Gilad Y
    wrote on 7 Dec 2016, 06:29 last edited by
    #1

    Hi,

    I need to create a QDialog in an application that I can not (I won't go into all the details as for why) add a QApplication.
    I thought the correct way to do it is to create an ActiveX control.
    However I'm not sure how to create the Control so it will be displayed as a dialog in my application.
    Any suggestions would be appreciated.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 7 Dec 2016, 07:21 last edited by
      #2

      Hi
      What about putting Dialog in DLL and use that DLL with the App?
      http://stackoverflow.com/questions/11054087/starting-qt-gui-from-dll-in-dllstart-function

      G 1 Reply Last reply 7 Dec 2016, 09:22
      0
      • M mrjj
        7 Dec 2016, 07:21

        Hi
        What about putting Dialog in DLL and use that DLL with the App?
        http://stackoverflow.com/questions/11054087/starting-qt-gui-from-dll-in-dllstart-function

        G Offline
        G Offline
        Gilad Y
        wrote on 7 Dec 2016, 09:22 last edited by
        #3

        @mrjj
        I have two problems with that solution:
        1: My application has its own window and if I open the dialog in the different thread that was created in the other dll I will not be aware that a dialog was opened so I can't do it modal unless I'll get its win32 handle but I get I can create an API that pass me that info, but I thought a cleaner solution will be somehow if I create a modal dialog/window and embed in it the QDialog as an activeX control?
        2: If I'll want to create QWidgets other than QDialog this will not be a good solution I still think I'll need ActiveX controls as far as I understand and I want one solution for all the situations (I admit I did not mention that in my first post)

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 7 Dec 2016, 10:13 last edited by
          #4

          Hi
          So using ActiveX should cure the need for event loop via QApplication ?
          (makes sense since its standalone/can be)

          Sorry I have never tried ActiveX so I dont know if that will work.

          Should be fast to test.

          1 Reply Last reply
          0

          1/4

          7 Dec 2016, 06:29

          • Login

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