Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/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.
    0_1532505158311_capture3.png

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


  • Lifetime Qt Champion

    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



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

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


Log in to reply