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

QWidget, masking child widgets

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 4.7.0
    • 4.4.0, 4.4.1, 4.4.2, 4.4.3, 4.5.0, 4.5.1, 4.5.2, 4.5.3, 4.6.0, 4.6.1, 4.6.2, 4.6.3, 4.7.0
    • None
    • Intel
      GNU/Linux and OS X
      64-bit
    • 7101ae5a0e90d97acf86a444c4d51ca45e7863fe

    Description

      There is a problem with the masking function(s) when setting the mask on a class that is derived from QAbstractScrollArea. The mask won't mask the viewport which makes the widget able to receive events outside its masked area.
      The obvious way to solve it, is to explicitly set a mask on the viewport as well, but that don't strike me as an intuitive way to do it.

      I have attached two files, one is an example application showing the problem the second one possible fix/patch for the QWidget source class (Qt 4.6.0).

      The problem is more severe when the host-system is OS X, neither setting the mask explicitly on the viewport or applying the patch to Qt (cocoa 4.6.0) seams to work very well.

      Attachments

        1. masking.tar.bz2
          3 kB
        2. qtbug-7150.patch
          9 kB
        3. qwidget.cpp.patch
          0.7 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            bjnilsen Bjørn Erik Nilsen
            stromme Christian
            Votes:
            8 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes