Important: Please read the Qt Code of Conduct -

How can I make a widget overlap multiple widgets?

  • 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.

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

  • Lifetime Qt Champion

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

    However, this might be interesting for you

  • @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.

  • Lifetime Qt Champion

    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.

Log in to reply