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. Is it possible to put one native Win32 window and one Qt window together in same app
Qt 6.11 is out! See what's new in the release blog

Is it possible to put one native Win32 window and one Qt window together in same app

Scheduled Pinned Locked Moved General and Desktop
8 Posts 2 Posters 6.3k 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.
  • F Offline
    F Offline
    fifth
    wrote on last edited by
    #1

    The layout should be like WinAmp, you know. There will be 2 top-level windows, one is native window, the other is Qt window, they sit side by side. And the app entry should be WinMain instead of QApplication.
    First of all, I'm not sure that how to translate Windows messages to QEvents and how to start Qt event loop.

    The origin was that I already got a Qt widget, now I'm going to plan some additional features. These new features will be evolved and almost function independently. There will be only one direction communication, from new part to Qt widget.
    Furthermore the people who will develop these features may totally have no knowledge of Qt, he could use Win32, MFC, even WinForm, etc.

    Does this make any sense?
    Thanks.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      Darryl DSouza
      wrote on last edited by
      #2

      It must be possible. You can have a look at http://doc.trolltech.com/solutions/qtwinmigrate/winmigrate-walkthrough.html

      Darryl D'Souza

      1 Reply Last reply
      0
      • D Offline
        D Offline
        Darryl DSouza
        wrote on last edited by
        #3

        You can easily translate the windows events to Qt events.

        There are some examples with exactly what you wanted below.
        http://qt.nokia.com/products/qt-addons/solutions-archive
        http://doc.trolltech.com/solutions/4/qtwinmigrate/winmigrate-qt-in-win32-example.html
        http://doc.trolltech.com/solutions/4/qtwinmigrate/

        Darryl D'Souza

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

          Thanks for guide.
          But I didn't found classes like QWinWidget, QMfcApp in latest 4.7.1, did they remove it?

          1 Reply Last reply
          0
          • D Offline
            D Offline
            Darryl DSouza
            wrote on last edited by
            #5

            Please read the content of the web. The archive is moved to http://qt.gitorious.org/qt-solutions
            You will find those classes in the source tree.

            Darryl D'Souza

            1 Reply Last reply
            0
            • D Offline
              D Offline
              Darryl DSouza
              wrote on last edited by
              #6

              Ok. here it is exactly...http://qt.gitorious.org/qt-solutions/qt-solutions/trees/master/qtwinmigrate
              Download these classes and use them. They are not part of the standard Qt sdk but some extended classes, but you can use them.

              Darryl D'Souza

              1 Reply Last reply
              0
              • F Offline
                F Offline
                fifth
                wrote on last edited by
                #7

                Got it, thx

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  Darryl DSouza
                  wrote on last edited by
                  #8

                  You are welcome:)

                  Darryl D'Souza

                  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