51 if ( watched != mWidget )
54 switch ( event->type() )
58 updateDevicePixelFromScreen();
59 updateAvailableGeometryFromScreen();
64 connect( handle, &QWindow::screenChanged,
this, [=]( QScreen * ) {
65 disconnect( mScreenDpiChangedConnection );
66 disconnect( mAvailableGeometryChangedConnection );
70 mScreenDpiChangedConnection = connect( windowHandleInLambda->screen(), &QScreen::physicalDotsPerInchChanged,
this, &QgsScreenHelper::updateDevicePixelFromScreen );
71 updateDevicePixelFromScreen();
73 mAvailableGeometryChangedConnection = connect( windowHandleInLambda->screen(), &QScreen::availableGeometryChanged,
this, &QgsScreenHelper::updateAvailableGeometryFromScreen );
74 updateAvailableGeometryFromScreen();
78 mScreenDpiChangedConnection = connect( handle->screen(), &QScreen::physicalDotsPerInchChanged,
this, &QgsScreenHelper::updateDevicePixelFromScreen );
79 mAvailableGeometryChangedConnection = connect( handle->screen(), &QScreen::availableGeometryChanged,
this, &QgsScreenHelper::updateAvailableGeometryFromScreen );
bool qgsDoubleNear(double a, double b, double epsilon=4 *std::numeric_limits< double >::epsilon())
Compare two doubles (but allow some difference)