OS X. Rectangle blinks while resizing



  • Hello,

    I created a very simple QML file MyRectangle.qml. Its content is:

    @import QtQuick 2.0

    Rectangle {
    id: root
    width: 300; height: 500
    color: "green"

    Rectangle {
        id: child
        height: root.height / 2
        anchors { top: parent.top; left: parent.left; right: parent.right }
        color: "blue"
    }
    

    }
    @

    If I run the file with qmlscene on Windows everything goes fine. But when I run the same on OS X 10.7 (on virtual machine):

    > qmlscene MyRectangle.qml

    I got strange weird blinking when I try to resize a window. I recorded the blinking. It can be seen on this video: http://youtu.be/8psqoRixSzI

    This strange behavior reproduces only on OS X. Unfortunately I can't test it on real MacBook therefore I test it only my virtual machine.
    Here is my specs:

    VM: VMWare Workstation 9.0.1
    Guest OS: OS X 10.7.1
    Qt: 5.1.1

    So does anybody face this problem or this is a known bug? Could anybody tell me what am I doing wrong?

    Thanks



  • For anyone who might be interested I got rid of the annoying flittering by adding multi-sampling to qlmscene:

    > qmlscene --multisample MyRectangle.qml

    Everything re-sized smoothly but slowly distinctly with this option turned on.

    By the way you can enable multi-sampling on QWindow class and its derivatives in your application by customizing its format:

    @QQuickView view;
    view.setSource(QUrl("/path/to/MyRectangle.qml"));
    QSurfaceFormat surfaceFormat(view.format());
    surfaceFormat.setSamples(8);
    view.setFormat(surfaceFormat);@


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.