improve 4K images

This commit is contained in:
Syping 2020-05-19 16:41:54 +02:00
parent 01d43e6e20
commit 5ea18c9b4b
3 changed files with 5 additions and 0 deletions

View file

@ -26,6 +26,7 @@
int main(int argc, char *argv[])
{
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true);
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true);
QApplication a(argc, argv);
#ifdef Q_OS_WIN

View file

@ -30,6 +30,7 @@
int main(int argc, char *argv[])
{
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true);
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true);
QApplication a(argc, argv);
#ifdef Q_OS_WIN
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)

View file

@ -641,6 +641,9 @@ int LuaEngineGui::setWidgetImageSize(lua_State *L_p)
if (((QObject*)pointer)->inherits("QPushButton")) {
((QPushButton*)pointer)->setIconSize(QSize(getVariant(L_p, 2).toInt(), getVariant(L_p, 3).toInt()));
}
else if (((QObject*)pointer)->inherits("QToolBar")) {
((QToolBar*)pointer)->setIconSize(QSize(getVariant(L_p, 2).toInt(), getVariant(L_p, 3).toInt()));
}
return 0;
}
}