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 stylesheet
QtWS25 Last Chance

QToolButton stylesheet

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 4.8k 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.
  • S Offline
    S Offline
    Sorin
    wrote on last edited by
    #1

    I want to create a QToolButton with menu arrow under the text button but i didn't find a stylesheet for that.

    @ToolButton* button = new QToolButton( parent );

    button->setCheckable( false );
    button->setPopupMode( QToolButton::MenuButtonPopup );
    button->setToolButtonStyle( Qt::ToolButtonTextUnderIcon );
    button->setIcon( icon );@

    The menu arrow is on the right side and i want to put it bottom. How the stylesheet should look?

    Thanks!

    There are only 10 types of people in the world: Those who understand binary, and those who don't

    1 Reply Last reply
    0
    • ? This user is from outside of this forum
      ? This user is from outside of this forum
      Guest
      wrote on last edited by
      #2

      I think you know that the setToolButtonStyle() can only set the icon position wrt the text. e.g. the "folder" icon for the File->Open ... not to be confused with menu arrow position.

      From what I've seen, I don't think by default you can set the menu arrow position to a different location using stylesheet. Check this "faq":http://developer.qt.nokia.com/faq/answer/how_can_i_draw_custom_subcontrols_for_a_complex_control on a similar example on how to draw custom sub controls for a complex control

      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