HI ALL,
Iam newbie to this Qt5 ,HERE i want to resize my gui based on system resolutions. and my application screen is like 768x1024 size for 1920 x 1080 system resolution. iam using the resize as
QScreen *screen
= QGuiApplication
::primaryScreen();
if (screen) {
QRect screenGeometry
= screen
->geometry
();
int screenWidth = screenGeometry.width();
int screenHeight = screenGeometry.height();
this->resize(screenWidth, screenHeight);
}
QScreen *screen = QGuiApplication::primaryScreen();
if (screen) {
QRect screenGeometry = screen->geometry();
int screenWidth = screenGeometry.width();
int screenHeight = screenGeometry.height();
this->resize(screenWidth, screenHeight);
}
To copy to clipboard, switch view to plain text mode
Screen Size: 800 x 600
Window Size: 800 x 600
Screen Size: 1920 x 1080
Window Size: 1920 x 1080
Screen Size: 1680 x 1050
Window Size: 1680 x 1050
if i use
const int defaultWidth = 768;
const int defaultHeight = 1024;
this->resize(defaultWidth,defaultHeight);
const int defaultWidth = 768;
const int defaultHeight = 1024;
this->resize(defaultWidth,defaultHeight);
To copy to clipboard, switch view to plain text mode
Screen Size: 1920 x 1080
Window Size: 768 x 1024
Screen Size: 800 x 600
Window Size: 800 x 600 its fit to the screen but i need it in 450x600 resolutions according to the 768x1024 gui screen size .
Bookmarks