Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Minimizing frameless windows from the taskbar and show again, it will lead app to no reponse, is a bug?
QtWS25 Last Chance

Minimizing frameless windows from the taskbar and show again, it will lead app to no reponse, is a bug?

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 2.2k Views
  • 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.
  • D Offline
    D Offline
    dagan9528
    wrote on last edited by
    #1

    Minimizing the frameless windows from the taskbar and show again, it will lead app to no reponse.
    Platform: win7 x86 desktop
    Below is test code base Qt Quick 1 Application(Built-in Elements)

    @main.qml

    import QtQuick 1.1

    Rectangle {
    id: root
    width: 400
    height: 300
    color: "#00000000"

    property string titleCloseSource: "uiResource/btn_close_n.png"
    
    Image {
        id: iconClose
        anchors.fill: parent
        source: root.titleCloseSource
    
        MouseArea {
            id: maClose
            hoverEnabled: true
            anchors.fill: parent
            onClicked: Qt.quit();
            onEntered: root.titleCloseSource = "uiResource/btn_close_p.png"
            onExited: root.titleCloseSource = "uiResource/btn_close_n.png"
            onPressed: root.titleCloseSource = "uiResource/btn_close_h.png"
        }
    }
    

    }@
    This is a Image will change source by mouse event.

    @main.cpp

    Q_DECL_EXPORT int main(int argc, char *argv[])
    {
    //...
    viewer.setMainQmlFile(QLatin1String("qml/main.qml"));

    //transparent
    viewer.setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowSystemMenuHint | Qt::WindowMinimizeButtonHint );
    viewer.setAttribute(Qt::WA_TranslucentBackground);
    viewer.setStyleSheet("background:transparent;");

    //...
    

    }@
    This is add WindowsFlags.

    When app running, the mouse event is working correct. And then minimizing frameless windows from the taskbar and show again, the Image not change source when mouse event.

    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