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



  • 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.



  • 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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.