Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

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

    General and Desktop
    2
    3
    646
    Loading More Posts
    • 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
      KIT2005 last edited by

      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-worx 1 Reply Last reply Reply Quote 0
      • raven-worx
        raven-worx Moderators @KIT2005 last edited by

        @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 Reply Quote 1
        • K
          KIT2005 @raven-worx last edited by

          @raven-worx
          Thanks

          1 Reply Last reply Reply Quote 0
          • First post
            Last post