Solved QML only display Close Windows hint
-
Hey,
I'm trying to hide the minimize and and maximize buttons from the title bar and came across the window hint flags CustomizeWindowHint , WindowMinMaxButtonsHint and WindowCloseButtonHint
hiding all of them works fine in qml:flags: Qt.WindowTitleHint
but trying to only display the close button doesn't work somehow with the custom flag:
flags: Qt.CustomizeWindowHint | Qt.WindowCloseButtonHint
can anyone help?
-
ok i've found a solutionj to this. Windows probably requires certain flags to be set, like Dialog:
flags: Qt.WindowCloseButtonHint | Qt.CustomizeWindowHint | Qt.Dialog | Qt.WindowTitleHint
this works for Closehint only
-
@Slei
Not all flags work in all situations, window features are still OS-dependent at the fundamental level. It is therefore particularly important you should state your target platform(s) & version(s) for this question. -
@JonB
Currently I'm working on windows. -
Has anyone any idea?, I'm sure windows supports "close hint only", but I'm not sure if QT supports it.
-
Have you tried this ?
flags: Qt.CustomizeWindowHint | Qt.WindowTitleHint | Qt.WindowCloseButtonHint
It works on mac.
-
@GrecKo said in QML only display Close Windows hint:
Qt.CustomizeWindowHint | Qt.WindowTitleHint | Qt.WindowCloseButtonHint
yeah, it displays only the title bar without any buttons on Win10, so maybe qt doesn't support this for windows, or windows doens't support this in general.
-
This post is deleted! -
I've checked again in some windows forums and windows should be capable of displaying only the close hint in the title bar.
-
ok i've found a solutionj to this. Windows probably requires certain flags to be set, like Dialog:
flags: Qt.WindowCloseButtonHint | Qt.CustomizeWindowHint | Qt.Dialog | Qt.WindowTitleHint
this works for Closehint only