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

setMask do not affects on DeclarativeView based window

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Out of scope
    • Affects Version/s: 4.7.3
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      MacOs 10.6.8
      QtCreator 2.1
      QtSDK 1.1

      Description

      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

        Attachments

          Issue Links

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

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes