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 forcibly update child widgets in parent?
Forum Updated to NodeBB v4.3 + New Features

How to forcibly update child widgets in parent?

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 7.2k 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.
  • F Offline
    F Offline
    fifth
    wrote on last edited by
    #1

    Looks like QWidget::update() doesn't update child widgets, if I have to manually update children, how to get that?
    Thanks.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Chuck Gao
      wrote on last edited by
      #2

      Why you think it doesn't update child widgets?

      Chuck

      1 Reply Last reply
      0
      • F Offline
        F Offline
        fifth
        wrote on last edited by
        #3

        I got a container widget which included several child widgets,

        Calling MyContainerWidget::update() didn't update those children in my case.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dangelog
          wrote on last edited by
          #4

          That's right. But why do you want a parent update their children? Aren't they supposed to know that they need a repaint?

          (In any case, you can just get the list of children widgets and call update manually).

          Software Engineer
          KDAB (UK) Ltd., a KDAB Group company

          1 Reply Last reply
          0
          • F Offline
            F Offline
            fifth
            wrote on last edited by
            #5

            [quote author="peppe" date="1311579226"]
            (In any case, you can just get the list of children widgets and call update manually).[/quote]

            That's exactly what I do not want to do, not smart anyway :(

            In GUI view, yes, I should not bother to manually update children.
            In my case, I have another internal logic to update view. When and how to paint view is not fully determined by those paint events.

            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