QToolButton stylesheet

  • 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?


  • 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

Log in to reply