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

QWidget completely ignores setting its position before show

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.9.1
    • None
    • Linux distro: openSUSE Tumbleweed.

      Qt 5.9.1

       

    Description

      The attached simple CMake based test app creates a main window

       with two buttons 'Show 1' and 'Show 2'. Both buttons alternately

       show or hide two more corresponding main windows.  We set the

       second one's geometry at creation, but not the first one's.

      The main windows' geometries are saved before hiding and

       recalled before showing.

      Now the BUG: Notice that after manually moving the windows around,

       then upon hiding and showing by clicking the buttons, main window #1

       will NOT honor the saved position it is given no matter how many times

       it is hidden and shown, while main window #2 does.

      (Notice both main windows do honor the saved size however.)

      We do want Qt to go ahead and pick a full initial geometry, but

       thereafter honor our saved settings. But it won't honor the position.

      It seems that it decides to stay in 'auto-placement' mode and won't

       accept any new position after that.

      Please note: QSettings is not a good option for this specific part

       of our application, we need this local technique instead.

      Thanks.

      Attachments

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

        Activity

          People

            richard Richard Moe Gustavsen
            Tim E. Real Tim E. Real
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes