How can i hide a QAction in the QToolbar?

  • Hello,

    how can hide one QAction in a QToolbar? I will hide one Button from two.
    I hope someone have a good answer.
    Sorry for my worst englisch.


    Alex from Germany ;-)

  • @nickvan86

    setVisible can be applied to QAction in the toolbar.

  • Hello,

    thanks for the answer.
    When i write this code:


    The completly toolBar is hide.

    When i will the first button hide, i write this:


    Thank you ;-)


    Alex from Germany

  • Yes, that is the way it should work.

    You can hide also anything based on QWidget Sometimes you have more than one possibility. So there is also some redundancy.

Log in to reply

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