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

QQuickLoader will resize the item when the item is parented to other item

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.14.2
    • None
    • All

    Description

      I need to reparent a loaded item to a different parent for undocking it from my main window, and I need to set the parent back when docking it back. However, when the item is undocked (its parent is not the loader any longer), the QQuickLoader will still resizing the item.

       

      Inside `QQuickLoaderPrivate::_q_updateSize`, there is a check `if (!item) return;`, and I think it needs to be changed to `if ((!item) || item->parentItem() != q) return;`.

       

      There is work around solution, e.g., creating shim layer parent of the loader, but it may create unnecessary more complicate logic. 

      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
            pengyunquan Peng Yunquan
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes