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

QScrollArea scrollbars disappear when you make the window bigger than the available desktop space twice

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.6.1, 5.6.2, 5.12.2
    • None
    • I was able to reproduce this issue in Windows 10 and Linux (RedHat 7.3) environments.

    Description

      When you resize a window to a size bigger than the available desktop space the window will resize itself to the available desktop space and the scroll area inside will adjust itself.

      If the widget inside the scroll area is still bigger than the available space, the scrollbars will remain visible (correct)

      However, if you perform a second resize, the scroll bars will disappear. Sometimes only one scrollbar disappears, sometime both. The window itself will not change size (the minimize, maximize and close buttons do not change their positions).

      I create an application based on the imageviewer example. I simply changed the paste implementation so I can trigger the issue by pressing CTRL+V twice.

      void ImageViewer paste()
      {
          imageLabel->setFixedSize(QGuiApplication::primaryScreen()->availableSize().width()+300, QGuiApplication::primaryScreen()->availableSize().height()+300);
          resize (imageLabel->size());
      }
      

      Then I run the program, load an image (any will do) and press CTRL+V once.

      Then I manually move the window near to the (0, 0) position (carefully so I don't trigger the maximize). This will show that the window is the size of the desktop and has scroll bars.

      Once I press CTRL-V again the scroll bars will disappear.

      I'm attaching two images (one with the scroll bars, the other without) and also the app I used to reproduce it (image viewer example with paste changed to resize the window)

      Attachments

        1. imageviewer.zip
          6.86 MB
        2. imageviewer-example.zip
          11 kB
        3. QTBUG-66912.zip
          5 kB
        4. windowWithoutScrollBars.JPG
          windowWithoutScrollBars.JPG
          89 kB
        5. windowWithScrollBars.JPG
          windowWithScrollBars.JPG
          85 kB
        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
            liskan Fabio Moreira
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes