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. QToolButton is adding extra padding by itself
Forum Updated to NodeBB v4.3 + New Features

QToolButton is adding extra padding by itself

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 627 Views 1 Watching
  • 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.
  • K Offline
    K Offline
    Kite R
    wrote on last edited by
    #1

    Hi, I'm adding icons to QToolButtons with setIconSize(QSize(16, 16), but I'm getting this annoying extra padding on the right and bottom. Anyone have an idea why?

    alt text

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

      Hi
      yes its reserved for hover effect. ( blue frame)
      I dont know any way easy to get rid of it.

      1 Reply Last reply
      0
      • K Offline
        K Offline
        Kite R
        wrote on last edited by
        #3

        I can adjust padding using a stylesheet.

        QToolButton { padding: -1 -2 -2 -1; }
        

        Resets the padding completely, but I'm getting varying results on different QToolBars, was hoping there was a good way to reset it properly.

        1 Reply Last reply
        0
        • mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi
          I tried with QProxyStyle but could not guess where it get the border from so gave up and went with stylesheet.

          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