Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-20222

setMask do not affects on DeclarativeView based window

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 4.7.3
    • None
    • MacOs 10.6.8
      QtCreator 2.1
      QtSDK 1.1

      Steps to reproduce:
      1.Create window based on QDeclarativeView
      2. setMask with region or QPixmap->mask()

      main.cpp
      #include <QtGui/QApplication>
      #include "mainwindow.h"
      
      int main(int argc, char *argv[])
      {
      	QApplication a(argc, argv);
      	MainWindow w;
      	w.show();
      
      	return a.exec();
      }
      
      mainwindow.h
      #ifndef MAINWINDOW_H
      #define MAINWINDOW_H
      
      #include <QMainWindow>
      #include <QDeclarativeView>
      
      class MainWindow : public QDeclarativeView
      {
      public:
      	explicit MainWindow(QWidget *parent = 0);
      };
      
      #endif // MAINWINDOW_H
      
      mainwindow.cpp
      #include "mainwindow.h"
      #include "ui_mainwindow.h"
      
      MainWindow::MainWindow(QWidget *parent) :
      	QDeclarativeView(parent)
      {
      	this->setMask(QRegion(0,0, this->size().width(), this->size().height(), QRegion::Ellipse ));
      }
      

      On Windows 7 we have ellipse shaped window clipped with specific region.
      On MacOs 10.6.8 setMask do nothing.

      Screenshots for Win7 and MacOs windows and sources are in attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Unassigned Unassigned
            avida Dmitry Rezchykov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes