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. [Translated]Child widget border appears clipped when parent repaints first
Forum Updated to NodeBB v4.3 + New Features

[Translated]Child widget border appears clipped when parent repaints first

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 233 Views 2 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.
  • R Offline
    R Offline
    rjsn98
    wrote on last edited by
    #1

    I'm working with Qt 5.14.2 using C++.
    When the parent widget repaints, the child widget is included in the repaint area.
    However, the child widget seems to be painted before the parent, and as a result, the border (or edge) of the child widget appears clipped or overdrawn by the parent.

    How can I prevent the parent widget from overpainting the child widget's border during repaint?
    Is there a proper way to control the painting order or clip the parent drawing region to avoid overlapping the child?

    Any advice would be appreciated. Thanks!

    Pl45m4P 1 Reply Last reply
    0
    • R rjsn98

      I'm working with Qt 5.14.2 using C++.
      When the parent widget repaints, the child widget is included in the repaint area.
      However, the child widget seems to be painted before the parent, and as a result, the border (or edge) of the child widget appears clipped or overdrawn by the parent.

      How can I prevent the parent widget from overpainting the child widget's border during repaint?
      Is there a proper way to control the painting order or clip the parent drawing region to avoid overlapping the child?

      Any advice would be appreciated. Thanks!

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by
      #2

      @rjsn98

      What kind of widgets are you dealing with? On what OS?
      How does it look like?
      Usually events are propagated so the child in that area should repaint as well.


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      1 Reply Last reply
      0
      • Axel SpoerlA Online
        Axel SpoerlA Online
        Axel Spoerl
        Moderators
        wrote on last edited by
        #3

        A lot of painting bugs have been fixed in Qt 6.
        You may want to use a more recent version of Qt (>= 6.5) and see whether it still happens.
        5.14 has been EOL for a long time.

        Software Engineer
        The Qt Company, Oslo

        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