Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-40881

Windows MFC migration framework:- Events are not propagated to QDialog embedded in a native window parent



    • Bug
    • Resolution: Done
    • P2: Important
    • 5.4.0
    • 5.3.1
    • GUI: Window management
    • None
    • Windows 7
    • a4ac4b326318ed9034466305222280ed8d1651b5 (qtbase/5.4, 16.10.2014,5.4)


      If you run a Qt Window (e.g. QDialog) as a child of a native win32 window using qtwinmigrate, events are not propagated correctly. If you press for example on the Ok button or type some text, nothing happens. As soon as you change the windows size, events are propagated.

      How to reproduce:

      • Clone qt-solutions repository https://code.qt.io/cgit/qt-solutions/qt-solutions.git/ (was -https://qt.gitorious.org/qt-solutions-)
      • cd into qt-solutions\qtwinmigrate
      • run configure.bat -library
      • qmake
      • make
      • make install
      • Open qtwinmigrate\examples\mfc\step1\QtMfc.dsp in Visual Studio Pro
      • Build the project and run it
      • By clicking on About, the executable should link and resolve "qtdialog.dll" installed in your qtbase\bin directory (if the standard MFC About dialog is displayed, something is wrong)
      • qtdialog.dll opens a QDialog as a child window with a "Ok" and a "Cancel" button
      • you can press on the buttons but nothing happens.
      • Resize the dialog and the Ok button is triggered

      QtWinMigrate was patched to work with Qt 5.1. So I assume there is something wrong with QPA.

      I tried to debug into the code or at least follow whats happening, but this takes time. Maybe someone with more experience has a clue.

      I'll keep on investigating.

      By the way, with Qt 4.8.4 everything is normal. So the change was between Qt4 and Qt5 (if you need more accurate versions, I can provide more details)


        1. main.cpp
          3 kB
        2. qtbug40881_repro.diff
          1 kB

        Issue Links

          For Gerrit Dashboard: QTBUG-40881
          # Subject Branch Project Status CR V



              kleint Friedemann Kleint
              nikolaynnov Andrey
              1 Vote for this issue
              6 Start watching this issue



                Gerrit Reviews

                  There are no open Gerrit changes