Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Partially Solved] WindowFlags example shows bugs in Qt5 on Mac
Qt 6.11 is out! See what's new in the release blog

[Partially Solved] WindowFlags example shows bugs in Qt5 on Mac

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 2.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kegon
    wrote on last edited by
    #1

    This is on MacOS X Mountain Lion and Qt 5.0.1

    I created a QDialog but I cannot get the window to show the close button (red x) via Qt.

    So I tried the windowflags example to understand how to control the behaviour.

    The preview window in the example is based on a QWidget so it's not quite the same as my QDialog. When I start the example, all 3 buttons are lit.

    Clicking one at a time:
    WindowsCloseButtonHint -> no minimise button
    WindowsMinimiseButtonHint -> no close button
    WindowsMaximiseButton Hint -> no close or minimise buttons
    WindowContextHelpButtonHint -> no full screen title widget

    I can get my dialog to light the close button by @mydialog->setWindowFlags(Qt::Tool);@

    but this is far from ideal.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kegon
      wrote on last edited by
      #2

      OK, so it seems that on the Mac the rule is that modeless dialogs have the close button lit but modal dialogs must have their additional close buttons.

      Nonetheless, the windowflags example and general documentation should probably have some comments that on Mac you cannot override lighting of the window title bar buttons.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved