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. [Solved] QML: rendering problems after minimizing frameless window
Forum Updated to NodeBB v4.3 + New Features

[Solved] QML: rendering problems after minimizing frameless window

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 6.0k 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.
  • O Offline
    O Offline
    obsessed
    wrote on last edited by
    #1

    I'm trying to implement the QML-based UI inside of frameless (Qt::FramelessWindowHint) window.
    But QML engine stops responding to mouse clicks after window is minimized via showMinimized() method.

    the code follows:
    @
    Image {
    source: "minimize.png"
    scale: mouse.pressed ? 0.8 : 1.0
    smooth: mouse.pressed

    MouseArea {
        id: mouse
        anchors.fill: parent
        anchors.margins: -5
        onClicked: {
            console.log("MinimizeButton clicked");
            viewer.showMinimized(); // If comment out this line, works fine
        }
    }
    

    }
    @

    After clicking on MouseArea window is minimized as needed. But all Qt Quick controls inside window become frozen after window has been restored.
    Windows without Qt::FramelessWindowHint flag are not affected.
    showMinimized() is not the only method to reproduce, "Show Desktop" command of OS gives the same effect. OS is Windows XP.

    Is there any workaround for this problem?

    1 Reply Last reply
    0
    • O Offline
      O Offline
      obsessed
      wrote on last edited by
      #2

      I'm still hoping to hear any comments for this issue. This is a major problem and it truly exists on Windows OS.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        anselmolsm
        wrote on last edited by
        #3

        obsessed, we also experienced this problem in one of our projects.
        This "bug is reported":http://bugreports.qt.nokia.com/browse/QTBUG-17548 but is not solved yet. Following the link to the bug report, you'll find this workaround:

        @
        void MainWindow::showEvent(QShowEvent *event)
        {
        QApplication::postEvent(this, new QEvent(QEvent::UpdateRequest), Qt::LowEventPriority);
        QWidget::showEvent(event);
        }
        @

        Anselmo L. S. Melo (anselmolsm)

        1 Reply Last reply
        0
        • O Offline
          O Offline
          obsessed
          wrote on last edited by
          #4

          This solves the problem, thanks a lot.

          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