Qt 6.8 QML resize Jitter, bad performance
Unsolved
General and Desktop
-
Hi,
I am developing on windows 10 a Qt 6.8 application with Qt Quick and I am encountering some problems. I wrote the following code, but I can't get it to work properly and it gives me the error you can see in the gif below:I'm using windows 10 and this is the full code:
main.qmlimport QtQuick import QtQuick.Window import QtQuick.Controls Window { color: "white" width: 1280 height: 720 visible: true }
main.cpp
#include <QApplication> #include <QDateTime> #include <QDir> #include <QGuiApplication> #include <QQmlApplicationEngine> #include <QQmlContext> #include <QStandardPaths> #include <QString> #include <QTextStream> #include <QVector> int main(int argc, char *argv[]) { #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps #endif QApplication app(argc, argv); QQmlApplicationEngine engine; const QUrl url(QStringLiteral("qrc:/main.qml")); QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, &app, [url](QObject *obj, const QUrl &objUrl) { if (!obj && url == objUrl) QCoreApplication::exit(-1); }, Qt::QueuedConnection); engine.load(url); return app.exec(); }
QT += quick CONFIG += c++17 QT += qml QT += network QT += quickcontrols2 QT += widgets QT += core gui QT += multimedia DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x050F00 # You can make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 CONFIG += app_bundle SOURCES += \ main.cpp RESOURCES += ui.qrc # Additional import path used to resolve QML modules in Qt Creator's code model QML_IMPORT_PATH = # Additional import path used to resolve QML modules just for Qt Quick Designer QML_DESIGNER_IMPORT_PATH = # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target HEADERS +=
Do you have any suggestions on what I can correct or improve? Thank you in advance!