Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.6.0 Alpha, 5.6.0 Beta
-
None
-
Windows 7
-
892807623154a81b984baf4d525a55e7c4a29b07 (qtbase/5.6, 23.11.2015, 5.6)
Description
Requirements: device pixel ratio for monitors should be more than 1.0 by either using 4K monitor or by forcing it with qputenv("QT_SCALE_FACTOR", QByteArray("2"));
Can be easily reproduced when a widget’s geometry is set on non-primary monitor:
QWidget mainWindget(nullptr, Qt::FramelessWindowHint); mainWindget.setAttribute(Qt::WA_TranslucentBackground); QPushButton button(&mainWindget); button.setText("Sample Test"); //mainWindget.setGeometry(100, 100, 100, 100); // primary monitor mainWindget.setGeometry(2000, 100, 100, 100); // second monitor mainWindget.show();
Works fine if placed on primary monitor or when either of FramelessWindowHint or TranslucentBackground flags are not used.