[Solved]setMask() of QWindow in Qt 5.2 under Win 7 64-bit

  • I run the following code:

    #include <QtGui/QGuiApplication>
    #include "qtquick2applicationviewer.h"

    #include <QDebug>

    int main(int argc, char *argv[])
    QGuiApplication app(argc, argv);

    QWindow viewer;
    QRegion r(0, 0, 20, 20);
    qDebug() << viewer.mask();
    return app.exec&#40;&#41;;


    and the debug message is:

    QRegion(size=0), bounds = QRect(0,0 0x0)

    is it a bug?

  • Move viewer.show() earlier than viewer.setMask() can work.

    Sorry to waste your time.


Log in to reply

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