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

A dialog is not centered to its parent window when a minimum height larger than a certain value configured

    XMLWordPrintable

Details

    • Android

    Description

      This issue is only reproduced on Android.

      Expected Behavior:
      When a window pops up a dialog, the dialog is displayed centered to its parent window by default.

      Actual Behavior:
      When a minium height, which is larger than a certain value, is configured to the dialog, the top left corner of the dialog is centered, as the result, the whole dialog is shifted to the bottom right direction.
       
      Steps to reproduce the issue:
      1) Open the attached example project. In MainWindow constructor, enable one of test patterns (#if () / #elif() / #endif) which labeled "NG".
      2) Run the application on Android.
      3) Tap "show dialog" button. A black dialog show up with shifted to the bottom right (not centered to its parent window). See attached screen shot.

      Side note : 
      1) The issue is reproduced depending on the cofigured minimum height.
      When the parent window size is (360, 619), the issue is reproduced depending on the minimum size settings of dialog, as follows : 
       - the minimum dialog size = (538, 538) : the issue reprroduced
       - the minimum dialog size = (537, 537) : NOT reproduced
       - the minimum dialog size = (1000, 538) : the issue reprroduced
       - the minimum dialog size = (1000, 537) : NOT reproduced

      2) When setFixedSize(538, 538) is used instead of setMinimumSize/Height(), the issue is not reproduced. 

      3) This issue is reproduced with Qt 5.15.15, Qt 5.15.17, Qt 6.5.5, Qt 6.7.1. 

       

      Attachments

        1. menusAndroid_modified.zip
          4 kB
          Hitoshi Ito
        2. Screenshot_qt6_7_1.jpg
          102 kB
          Hitoshi Ito
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            axelspoerl Axel Spoerl
            hitoshiito Hitoshi Ito
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes