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

Adding a QQuickWidget at runtime changes window position

    XMLWordPrintable

Details

    • Windows
    • d4ccceabf (dev)

    Description

      Unzip, compile and run the attached project AddQmlWidget.zip.
      When the main window appears, move it to a distinct position on the Desktop (e.g. upper left corner).
      Press the "Click me" button. The main window jumps / changes its position, usually somewhere in the middle of the desktop.
      Expectation is: The main window position and size does not change.

      I debugged a bit into the Qt sources. I think this happens because the main window is re-created (without preserving the coordinates).

      Workaround is to query the coordinates in my own code and set it again after QQuickWidget* qmlWid=new QQuickWidget(m_widget);

      Attachments

        1. AddQmlWidget.zip
          2 kB
        2. After.png
          After.png
          346 kB
        3. Before.png
          Before.png
          425 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            morteza.jamshidi Morteza Jamshidi
            daniel_frey Daniel Frey
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes