Results 1 to 2 of 2

Thread: QML: rendering problems after showMinimized()

  1. #1
    Join Date
    Jun 2011
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QML: rendering problems after showMinimized()

    Encountered the following problem with rendering in QML. I have implemented the 'minimize' button on the frameless window:

    Qt Code:
    1. Image {
    2. source: "minimize.png"
    3. scale: mouse.pressed ? 0.8 : 1.0
    4. smooth: mouse.pressed
    5.  
    6. MouseArea {
    7. id: mouse
    8. anchors.fill: parent
    9. anchors.margins: -5
    10. onClicked: {
    11. console.log("MinimizeButton clicked");
    12. viewer.showMinimized();
    13. }
    14. }
    15. }
    To copy to clipboard, switch view to plain text mode 

    where 'viewer' is the object inherited from QDeclarativeView which represents the main application window. The button shrinks when user clicks the mouse onto it and window has been minimized. But button stays shrinked when window is restored. Tried to add the timer which prints 'mouse.pressed' every 1 sec:

    Qt Code:
    1. Timer {
    2. repeat: true
    3. interval: 1000
    4. running: true
    5. onTriggered: {
    6. console.log("mouse.pressed =",mouse.pressed);
    7. }
    8. }
    To copy to clipboard, switch view to plain text mode 

    It always prints mouse not pressed. But button is scaled to 0.8, not 1.0. "viewer.showMinimized()" appears to be guilty: button is rendered OK if it is commented out.

    Any suggestions to solve the problem?

  2. #2
    Join Date
    Jun 2011
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QML: rendering problems after showMinimized()

    The problem is related to QGraphicsView and it is relatively old (http://www.qtcentre.org/threads/3329...imized-problem).
    Still hope the solution exists. It is highly desirable to have possibility of making shaped windows with custom title bars in QML.

Similar Threads

  1. Replies: 8
    Last Post: 7th November 2012, 20:20
  2. Replies: 1
    Last Post: 13th August 2010, 22:29
  3. showMinimized() is not working on xburts linux processor
    By jthacker in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 2nd June 2010, 08:51
  4. SVG rendering problems and doubs
    By GuS in forum Qt Programming
    Replies: 3
    Last Post: 5th October 2009, 00:47
  5. showMinimized() steals the focus
    By The Storm in forum Qt Programming
    Replies: 2
    Last Post: 23rd January 2009, 08:11

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.