#include <QMessageBox>
#include <QAction>
#include <QTextCodec>
+#include <QWindow>
+#include <QScreen>
#include <sstream>
#include <string>
void setFocus(QWidget* theWidget, const QString& theInfo)
{
- activateWindow(theWidget);
theWidget->setFocus();
// rectangle of focus is not visible on tool button widgets
theWidget->update();
return true;
}
+qreal currentPixelRatio()
+{
+ QWindowList aWnds = qApp->topLevelWindows();
+ if (aWnds.size() > 0)
+ return aWnds.first()->devicePixelRatio();
+ return qApp->primaryScreen()->devicePixelRatio();
+}
+
} // namespace ModuleBase_Tools