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. QWidget refresh problem qt5.1
Forum Updated to NodeBB v4.3 + New Features

QWidget refresh problem qt5.1

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 2.9k 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.
  • J Offline
    J Offline
    Jassie
    wrote on last edited by
    #1

    Hi all,
    I use a QDialog as parent widget which load many children ,but when I set some children widget as invisiable, It can't refresh unless I make the QDialog show normal when it's maximum Or show maximum when it is normal.I've tried to updateGeometry of the QDialog or update the layout in the QDialog.But it do nothing eventhough I invoke resizeEvent()? Can someBody help me? this question puzzles me so many days.

    1 Reply Last reply
    0
    • JeroentjehomeJ Offline
      JeroentjehomeJ Offline
      Jeroentjehome
      wrote on last edited by
      #2

      This might help:
      @void QWidget::update() [slot]
      // Updates the widget unless updates are disabled or the widget is hidden.@
      But then again, when the widget is hidden it will NOT be updated.
      So update called on the Dialog should do the trick even when child widgets are invisible.

      Greetz, Jeroen

      1 Reply Last reply
      0
      • J Offline
        J Offline
        Jassie
        wrote on last edited by
        #3

        No, I just hide the children widget,But when I update the parent widget , It seems no use that there is also a trace of the hidden children unless I show the parent widget normal or maximum

        1 Reply Last reply
        0
        • JeroentjehomeJ Offline
          JeroentjehomeJ Offline
          Jeroentjehome
          wrote on last edited by
          #4

          Hi,
          What do you mean with bq. trace of the hidden children
          You still see some parts of them? The other widgets do not re-size over them? Maybe a picture to illustrate?

          Greetz, Jeroen

          1 Reply Last reply
          0
          • J Offline
            J Offline
            Jassie
            wrote on last edited by
            #5

            Sorry that I don't know how to show you a picture.
            For example , the parent widgets have 5 children, when I hide the first child, we should only see 4 children in the layout. The question is that when I hide the first, I can see two the fifth child. the first fifth child is enable, and the second fifth child is just a reflection of the fifth child .

            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