Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
None
-
5.15.1, 5.15.5
Description
On Windows 10 is is possible to show the taskbar on secondary screens. When using showMaximized() on a secondary screen, it seems as if showFullScreen() is invoked, regardless whether or not the taskbar is shown on that screen.
The following QML code shows the issue (maximizes correctly on primary screen, goes full screen on secondary screen even if the taskbar is showing - it covers the taskbar and the icon doesn't change to "restore" as the status is Window.Fullscreen rather than Window.Maximized).
import QtQuick 2.12 import QtQuick.Controls 2.3 import QtQuick.Layouts 1.3 import QtQuick.Window 2.3 Window { id: window visible: true flags: Qt.FramelessWindowHint width: 640 height: 480 function toggleMaximized() { if (window.visibility === Window.Maximized) { window.showNormal(); } else { window.showMaximized(); } } Page { anchors.fill: parent header: ToolBar { Item { anchors.fill: parent TapHandler { onTapped: if (tapCount === 2) toggleMaximized() gesturePolicy: TapHandler.DragThreshold } DragHandler { grabPermissions: TapHandler.CanTakeOverFromAnything onActiveChanged: if (active) { window.startSystemMove(); } } RowLayout { anchors.left: parent.left anchors.right: parent.right spacing: 3 Layout.fillWidth: true Item { Layout.fillWidth: true } ToolButton { text: "�" onClicked: window.showMinimized(); } ToolButton { text: window.visibility === Window.Maximized ? "�" : "�" onClicked: window.toggleMaximized() } ToolButton { text: "�" onClicked: window.close() } } } } } }
Attachments
Issue Links
- duplicates
-
QTBUG-51327 [Windows 8.1]: After maximizing a window and toggling the frameless window hint and moving to another monitor then the window can be too big
- Closed
- relates to
-
QTBUG-91226 Maximizing a frameless window using shortcut under Windows makes the window fullscreen
- Reported
-
QTBUG-39537 Frame-less windows can't be maximized on second monitor
- Closed
-
QTBUG-4362 Windows: showMaximized() doesn't consider taskbar when using Qt::CustomizeWindowHint to remove the title bar
- Closed
-
QTBUG-8361 Maximizing a frameless window makes the window fullscreen
- Closed