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 can I make a widget overlap multiple widgets?

How can I make a widget overlap multiple widgets?

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 1.1k Views
  • 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.
  • A Offline
    A Offline
    Aaron Kim
    wrote on last edited by SGaist
    #1

    0_1532504500741_capture.PNG

    If I push menuButton, (which is marked '≡') the floating sidebar menu should be shown like below.
    0_1532504990732_capture2.png(This is drawn with the MS paint)
    This problem make me puzzled because simply appending the sidebar widget as a child of contentWidget can not make the sidebar overlapping titleWidget either. Rather, it looks like below.
    0_1532505158311_capture3.png

    How can I make a widget overlap more than one other widgets?

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      You could make its parent mainwindow so its not inside central but might still be clipped.

      However, this might be interesting for you
      https://github.com/chrisaverage/burger-menu

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Aaron Kim
        wrote on last edited by Aaron Kim
        #3

        @mrjj Thanks, I solved it. Even though I had to write it manually.. Is there any way to make its parent mainwindow in Qt Creator? Every widgets are put into centralWidget, not mainwindow no matter where I put those widgets. Cut & paste also doesn't work. Even though I try to paste the widget into Mainwindow with right clicking MainWIndow, the widget is pasted into centralWidget.

        mrjjM 1 Reply Last reply
        0
        • A Aaron Kim

          @mrjj Thanks, I solved it. Even though I had to write it manually.. Is there any way to make its parent mainwindow in Qt Creator? Every widgets are put into centralWidget, not mainwindow no matter where I put those widgets. Cut & paste also doesn't work. Even though I try to paste the widget into Mainwindow with right clicking MainWIndow, the widget is pasted into centralWidget.

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Aaron-Kim
          Hi
          as far as i know Designer will always help u and put it as child of central.
          Even when u paste on Mainwindow.
          You can however call setParent
          after setupUI() to move it.

          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