if I try to resize my QMainWindow vertically, it quickly goes down the screen until it's no longer visible, but the size will never change, no matter if I enlarge or reduce it. I basically just show it and place several Buttons/VLayouts etc. in it, but never specify any kind of size policy.
main.cpp:
int __cdecl main(int argc, char *argv[]) {
QApplication app(argc, argv);
QApplication::setQuitOnLastWindowClosed(true);
...
mainWindow = new MainWindow();
mainWindow->showMaximized();
...
return QApplication::exec();
}
mainWindow.hpp:
class MainWindow : public QMainWindow {
Q_OBJECT
...
}
I thought that maybe a QWidget inside the window with a fixed size policy prevents the MainWindow from resizing, but it displays perfectly on my second screen which has a different resolution.
Using:
- QT5.14.2 (Components: Core, Widgets, Test, PrintSupport)
- build with mingw73_64
- C++17
- CMake 3.16.2
Additional Libraries:
- Boost 1.72
- GigaBASE (Database)
Hope someone can help, thank you in advance.