Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Windows 10 System sleep mode QML Ui Not redraw
Forum Updated to NodeBB v4.3 + New Features

Windows 10 System sleep mode QML Ui Not redraw

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 225 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jeffkim
    wrote on last edited by jeffkim
    #1

    Hi I came across this strange symptom while using qt 5.12.6 on window10.

    I set the Qt timer to 1 minute 10 seconds and show dialog window UI after 1 minute 10 seconds.
    But when the Qt timer is triggered while the window 10 system is sleeping, can't redraw.
    this qt bug?

    The image below is the image in question. ui not redraw...
    timer비정상동작.png

    source code

    ==============main.cpp================

    #include <QGuiApplication>
    #include <QQmlApplicationEngine>

    int main(int argc, char *argv[])
    {
    QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
    QGuiApplication 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();
    }

    =====main.qml======
    import QtQuick 2.12
    import QtQuick.Window 2.12
    import QtQml 2.12
    import QtQuick.Controls 1.4

    Window {
    visible: true
    width: 640
    height: 480
    //flags: Qt.Desktop
    title: qsTr("Hello World")

    Test1 {
    id: test1
    }

    Button {
    id:test
    width: 100
    height: 100
    onClicked: {
    test1.show()
    }
    }
    Timer {
    id: timer
    interval: 70000
    repeat: false
    triggeredOnStart: false
    running: true
    onTriggered: {
    console.log("Triggered")
    test1.show()
    }
    }
    }

    =====Test1.qml======
    import QtQml 2.12
    import QtQuick 2.12
    import QtQuick.Window 2.12
    import QtQuick.Controls 1.4

    Window {
    visible: false
    width: 400
    height: 300
    flags: Qt.Window
    title: qsTr("Hello World222")
    color: "red"

    Button {
    id:test
    width: 100
    text: "g2"
    height: 100
    }
    }

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved