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

Extend saveGeometry()/restoreGeometry() to parented widgets

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: GUI: Workspace
    • Labels:
      None

      Description

      Now couple QWidget::saveGeometry()/QWidget::restoreGeometry() works only for top-level widgets. It can be used for widgets which have parents but with improper result. In this case widget will be moved if screen has toolbar on top of it. Restore process uses absolute display properties to calculate widget position. But this does not give abt warnings while project assemling.

      My suggestion is - extend QWidget::saveGeometry()/QWidget::restoreGeometry() for widgets which have parent widget. For this it is needed include marker "hasparent" to QByteArray geometry returned by saveGeometry(). If this marker is found while restoring in QWidget::restoreGeometry() then it restores widget geometry as it works in relative parent position, not desktop.

        Attachments

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

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            gourmet Gourmand
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes