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. [Solved]How to change the painting order of widgets?
Forum Updated to NodeBB v4.3 + New Features

[Solved]How to change the painting order of widgets?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.3k Views 1 Watching
  • 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.
  • S Offline
    S Offline
    stuartx
    wrote on last edited by
    #1

    Hi,

    I have a question regarding painting / updating widgets. I have two simple widgets in rectangle shape: rectangle-red and rectangle-yellow. Both are filled with solid color. These two widgets have an overlap area. Some times I want to show the red color (from rectangle-red) on top, and some times I want to show the yellow color on top. I think the widget that painted late will cover the one painted earlier. So I tried to change the update order of the widgets with the "update()". It does not work. Could any one tell me how to solve my problem? Thanks.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DerManu
      wrote on last edited by
      #2

      see QWidget::raise/lower/stackUnder()

      1 Reply Last reply
      0
      • S Offline
        S Offline
        stuartx
        wrote on last edited by
        #3

        thanks, tested and worked fine.

        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