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

Painting & Dropdown Layout Issues with QWindowContainer

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.6.0
    • None
    • Window 7

    Description

      We use an out of process plugin architecture in our platform: the main process is a Qt desktop application while plugins are separate processes which are launched by the main process and communicate through RPC.

      We have a feature which allows a plugin to create a QWidget (in his own process) and “insert” it in the UI of the main process. The QWidget still lives in the plugin process. The plugin usually connects to signal and modifies it dynamically.

      Our current solution to implement this feature is by creating a host QWidget on the main application side (the windows) with the Qt::MSWindowsOwnDC flag and by using the windows API to make it the parent of the plugin QWidget. In order to make this work in most cases, we have a lot of hacks (using event filter on plugin side to process some event specifically or send them to the main application, several levels of widget on main application side for various issue, etc.). And even with these hacks we still have many remaining issues like:

      • when the QWidget contains a WPF component, it is not refreshed correctly and reveals painting issues
      • when Techlog display a modal dialog, all plugin widget becomes blank until the modal dialog is closed

      As a conclusion, our current solution is using completely unsupported features and we thus have to struggle with Qt to make the solution work. When we contacted Qt, it was then suggested to try to use the QWindowContainer solution to re-parent the plugin QWidget to our main application.

      Here is a summary of our feedback compared to our current solution:

      The good points are:

      • No need to manage plugin widget resizing
      • No need to re-parent plugin widget with SetParent(HWND)
      • Our code is simpler

      But some issues remain:

      • We were hoping the WindowContainer would solve the painting issues we have with the current solution (slide 1) but they remain (slide 2)
      • Combo-box dropdown does not appear correctly (see vertical & horizontal offsets in slide 3)
      • Other issues have been reported by Qt users regarding the WindowContainer (QTBUG-40320) and they are a bit worrying

      We are open to any suggestions to improve our use of WindowContainer or any alternative design solutions.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            herrmany Yan Herrmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes