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. How can i change the size of my icon?
Forum Updated to NodeBB v4.3 + New Features

How can i change the size of my icon?

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 1.1k 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.
  • V Offline
    V Offline
    victor wang
    wrote on last edited by
    #1

    Hi, i'm using qt5.5 on my computer.
    This is my user interface here.
    http://imgur.com/wA4spzB

    How can i change the size which i marked it in the picture?

    Please Help!

    raven-worxR 1 Reply Last reply
    0
    • V victor wang

      Hi, i'm using qt5.5 on my computer.
      This is my user interface here.
      http://imgur.com/wA4spzB

      How can i change the size which i marked it in the picture?

      Please Help!

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @victor-wang
      Are you using a stylesheet now?
      If not you can apply a custom QProxyStyle to your tab-bar widget:

      class MyProxyStyle : public QProxyStyle
      {
      public:
           ....
      
          virtual int pixelMetric(QStyle::PixelMetric metric, const QStyleOption * option = 0, const QWidget * widget = 0) const
          {
                   if( metric == QStyle::PM_TabBarScrollButtonWidth )
                          return 30;
                   else
                           return QProxyStyle::pixelMetricmetric, option, widget);
          }
      };
      

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      V 1 Reply Last reply
      2
      • raven-worxR raven-worx

        @victor-wang
        Are you using a stylesheet now?
        If not you can apply a custom QProxyStyle to your tab-bar widget:

        class MyProxyStyle : public QProxyStyle
        {
        public:
             ....
        
            virtual int pixelMetric(QStyle::PixelMetric metric, const QStyleOption * option = 0, const QWidget * widget = 0) const
            {
                     if( metric == QStyle::PM_TabBarScrollButtonWidth )
                            return 30;
                     else
                             return QProxyStyle::pixelMetricmetric, option, widget);
            }
        };
        
        V Offline
        V Offline
        victor wang
        wrote on last edited by
        #3

        @raven-worx
        But i am using stylesheet.
        Is there any way to change the size of icon if i am using stylesheet?

        raven-worxR 1 Reply Last reply
        0
        • V victor wang

          @raven-worx
          But i am using stylesheet.
          Is there any way to change the size of icon if i am using stylesheet?

          raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by
          #4

          @victor-wang
          Try:

          QTabBar::scroller { /* the width of the scroll buttons */
              width: 20px;
          }
          

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          3

          • Login

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