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. Floating child widget
Qt 6.11 is out! See what's new in the release blog

Floating child widget

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 4.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.
  • P Offline
    P Offline
    p-himik
    wrote on last edited by
    #1

    I need to create a widget that would move with it's parent widget and it's wouldn't be bounded by parent's size (something similar to QListWidget part of QComboBox). I tried some WindowFlags which looked like relevant but all to no avail.
    I there any easy way to do this?

    1 Reply Last reply
    0
    • P Offline
      P Offline
      p-himik
      wrote on last edited by
      #2

      Here is a picture for sure. Green widget must be moved along with the red widget.

      !http://db.tt/vtJUkBpq(Widgets)!

      1 Reply Last reply
      0
      • K Offline
        K Offline
        Kxyu
        wrote on last edited by
        #3

        Ithink the only way to do that is to make the widget formaly independent of a parent widget, e.g, construct it in parents constructor and destroy in destructor, but do not construct it with a parent parameter.

        1 Reply Last reply
        0
        • P Offline
          P Offline
          p-himik
          wrote on last edited by
          #4

          But how make it to move along with the "parent" widget?

          1 Reply Last reply
          0
          • K Offline
            K Offline
            Kxyu
            wrote on last edited by
            #5

            You should try reimplementing moveEvent for a parent widget

            1 Reply Last reply
            0
            • P Offline
              P Offline
              p-himik
              wrote on last edited by
              #6

              Oh, somehow i missed it. Thank you.

              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