mirror of
https://gitlab.com/Syping/luaengineapp.git
synced 2024-12-22 11:55:29 +01:00
improve 4K images
This commit is contained in:
parent
01d43e6e20
commit
5ea18c9b4b
3 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue