Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QToolBar and QAction Styling



  • Hello,
    I am trying to style my top QToolBar so that a logo appears on the right.
    This works if I set the following in my StyleSheet.

    border-image: url(":/images/images/mypicture.png");
    

    However this causes a problem with the QAction icons on the QToolBar. The also get the border image. I have tried setting the border to:

    border: 0px
    

    But this does not work.
    Is there a way to remove the border image from the QAction icons using the stylesheet?

    I am using QtCreator 4.9.1 and Qt 5.13.

    Thank you.


  • Lifetime Qt Champion

    Hi,

    Can you show what you are currently getting ?



  • @sgaist
    Hello,
    I found a work around. And removed the border image entirely.
    Then used a QLabel to place the image exactly where I want it.


Log in to reply