Top right align QToolBar



  • Hi,

    I want to add a movable toolbar on the top right of my screen. The only tricks I saw use an empty widget with an extensive policy. The problem of that is the grab action.
    0_1515745116409_toolbar.png

    The expected result is a grab widget just on the left of my toolbar.
    0_1515745234424_toolbarresult.png

    Is there a good solution for that?

    regards,
    robin



  • @Robinsondesbois Hi,friend. Welcome.

    You can use a QWidget to add some QTollButtons as QToolBar. But this way cann't let the bar move by mouse in QMainWindow.

    Becuase in different OS, Win and Mac, we should use QToolBar in Win and QMacToolBar in Mac.

    So, I used QWidget to add some QToolButton. In QWidget we can set any layout.



  • Hi!
    Thank you for the reply !

    Put a QWidget with a correct layout into the Qtoolbar don't correct my problem because the grab item still show on the left of the toolbar (not just near the first QToolButton).

    regards


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.