Re: Skinned Windows (own TitleBar and Borders)
From what I've read I guess you'll have to implement it yourself using the QScreen framework to workout how big it should become once maximized to not overlap the taskbar. But im curious if it's possible to have Windows 7s snap into grid functionality working with a custom window-frame? Does anyone know if this can be implemented?
Re: Skinned Windows (own TitleBar and Borders)
Master Load,
I implemented a window today with maximizing capabilities with the borderless-flag set (so from scratch). What you have to do is retriving the availableGeometry rect from the QDesktopWidget class.
Code:
QRect availableGeometry
= qApp
->desktop
()->availableGeometry
(mainWindow
);
This will give you the geometry of the available screen area (minus the taskbar).
Then you could do something like this to maximize and move the window to the correct location:
Code:
mainWindow->setMaximumSize(availableGeometry.width(), availableGeometry.height());
mainWindow->showMaximized();
mainWindow->move(availableGeometry.x(), availableGeometry.y());
mainWindow->showMaximized();
On top of that I used QSettings to remember the nonmaximized state so that I could recover it later when the window is minimized.
Hope this helps :)