Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to force painting of a widget?
QtWS25 Last Chance

How to force painting of a widget?

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 2.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jesuisbenjamin
    wrote on last edited by
    #1

    I would like to apply a mask (a QWidget) on top of page (QLabels) that are visible within a QScrollArea.
    To do this I check whether they are visible after the mask is requested then send an Page.mask.update(). In some cases however eg. if two pages are visible simultaneously, only one page gets the event while the other is pending and appears only later when scrolling or so.

    The output of few string from my application shows the process:

    @page 8 is visible, hence repaint.
    page 9 is visible, hence repaint.

    Mask of page 9 received paint event
    region to paint is PyQt4.QtCore.QRect(0, 0, 100, 30)
    applying mask...

    scroll event

    Mask of page 8 received paint event
    region to paint is PyQt4.QtCore.QRect(0, 0, 531, 194)
    applying mask...
    @

    I tried to replace the update() method call by repaint(), but that doesn't help.

    What can I do to force this mask to be repainted?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved