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. Change the size of ">>" arrow when a QToolBar is too small
Forum Update on Monday, May 27th 2025

Change the size of ">>" arrow when a QToolBar is too small

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 902 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.
  • K Offline
    K Offline
    KIT2005
    wrote on last edited by
    #1

    In my application I have a toolbar and set of buttons. My toolbar size is small and hence >> extension button appears. Pressing the extension buttons shows all the items. But the size of the >> extension button is very small and it is difficult to operate with out a mouse.

    Is it possible to change the size of the >> extension button in the Toolbar?

    raven-worxR 1 Reply Last reply
    0
    • K KIT2005

      In my application I have a toolbar and set of buttons. My toolbar size is small and hence >> extension button appears. Pressing the extension buttons shows all the items. But the size of the >> extension button is very small and it is difficult to operate with out a mouse.

      Is it possible to change the size of the >> extension button in the Toolbar?

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

      @KIT2005
      the width of this button can only be changed by QStyle instances.
      So you need to subclass QProxyStyle.

      virtual int MyProxyStyle::pixelMetric(PixelMetric pm, const QStyleOption* option, const QWidget* widget) const
      {
        if( pm == QStyle::PM_ToolBarExtensionExtent ) 
           return XXX; // width for horizontal, height for vertical toolbars
        return QProxyStyle::pixelMetric(pm, 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

      K 1 Reply Last reply
      1
      • raven-worxR raven-worx

        @KIT2005
        the width of this button can only be changed by QStyle instances.
        So you need to subclass QProxyStyle.

        virtual int MyProxyStyle::pixelMetric(PixelMetric pm, const QStyleOption* option, const QWidget* widget) const
        {
          if( pm == QStyle::PM_ToolBarExtensionExtent ) 
             return XXX; // width for horizontal, height for vertical toolbars
          return QProxyStyle::pixelMetric(pm, option, widget);
        }
        
        K Offline
        K Offline
        KIT2005
        wrote on last edited by
        #3

        @raven-worx
        Thanks

        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