Shapes of control are shrinked on 4k displays d
-
Hi and welcome to devnet,
Your explication is not exactly clear. Can you post screen shots that shows the difference ?
By the way:
- What Qt version are you using ?
- What OS are you running ?
-
Did you already check the HighDPI chapter in Qt's documentation ?
-
If you follow the link to the attribute documentation, you can find QCoreApplication::setAttribute.
-
Setting the Qt::AA_EnableHighDpiScaling attribute to true in the MainWindow constructor
didn't help: the button shape remains shrinked. -
Tried. The same (i.e. button shrinked).
int main(int argc, char *argv[]){ QApplication a(argc, argv); QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); MainWindow w; w.show(); return a.exec(); }
-
@Pavel_47 said in Shapes of control are shrinked on 4k displays d:
AA_EnableHighDpiScaling
As explained in the documentation of this enum, it must be set before creating a QGuiApplication instance (which is also valid for QApplication since it's based on QGuiApplication).