mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-02 04:48:27 +00:00
C++: minimize/maximize/fullscreen API on Window
This commit is contained in:
parent
be8fdd15d5
commit
9f0c3c94a9
5 changed files with 109 additions and 3 deletions
|
|
@ -297,6 +297,15 @@ public:
|
|||
QWindow::setMaximumSize(c.max ? QSize(c.max->width, c.max->height)
|
||||
: QSize(1 << 15, 1 << 15));
|
||||
QWindow::setMinimumSize(c.min ? QSize(c.min->width, c.min->height) : QSize());
|
||||
|
||||
Qt::WindowStates states = windowState() & Qt::WindowActive;
|
||||
if (props.is_fullscreen())
|
||||
states |= Qt::WindowFullScreen;
|
||||
if (props.is_minimized())
|
||||
states |= Qt::WindowMinimized;
|
||||
if (props.is_maximized())
|
||||
states |= Qt::WindowMaximized;
|
||||
setWindowStates(states);
|
||||
}
|
||||
|
||||
void resizeEvent(QResizeEvent *ev) override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue