I'm building an application that has its own custom chrome. I have turned the default window border off by setting the flag:
this->setWindowFlags(Qt::FramelessWindowHint);
After this flag is set and the default window border is turned off, any calls to:
this->showMaximized();
result in a window that takes up the entire screen, overlapping the task bar. Is there a common work around for this or another method I should be calling instead of showMaximized()?
Win7/Qt4.6
You should not inherit from QDesktopWidget
.
You can get the "available geometry" by getting the QDesktopWidget
instance from QApplication::desktop:
QDesktopWidget *desktop = QApplication::desktop();
// Because reserved space can be on all sides of the scren
// you have to both move and resize the window
this->setGeometry(desktop->availableGeometry());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With