Fix tst_QStyleSheetStyle crash on uncommon multi-screen setup
It would crash if there is no screen at 0,0. Change-Id: Ic84d75b3d8b917fe3696530cbe843e82923ba676 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>bb10
parent
4e01b85115
commit
d1f924bbce
|
|
@ -2085,7 +2085,8 @@ void tst_QStyleSheetStyle::highdpiImages()
|
|||
QFETCH(QColor, color);
|
||||
|
||||
QWidget w;
|
||||
QScreen *screen = QGuiApplication::screenAt(w.pos());
|
||||
QScreen *screen = QGuiApplication::primaryScreen();
|
||||
w.move(screen->availableGeometry().topLeft());
|
||||
QHighDpiScaling::setScreenFactor(screen, screenFactor);
|
||||
w.setStyleSheet("QWidget { background-image: url(\":/images/testimage.png\"); }");
|
||||
w.show();
|
||||
|
|
|
|||
Loading…
Reference in New Issue