Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QToolBar and QAction Styling

QToolBar and QAction Styling

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 431 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Reghu_Att
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Can you show what you are currently getting ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      R 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Can you show what you are currently getting ?

        R Offline
        R Offline
        Reghu_Att
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved