Corner Button Color Style

For a c++ plugin that we are developing, we would like to have a button in the upper right corner of the pane. It should have the same color style as the DS "Render" or "Simulate" button. We tried some predefined styles in dzstyledefs.h but did not find the right one. Can someone give a hint here?

What we have so far:

    m_pPlayButton = new DzStyledButton( "Play", this );
    _pTabs->setCornerWidget( m_pPlayButton, Qt::TopRightCorner );

Comments

  • DobitDobit Posts: 181

    Just to make it clearer. I'm looking for a button style like in the attached picture (Blue example).

    But I always get uncolored standard buttons (Gray Example).

    I already tried without success:

        m_pPlayButton->setButtonStyle( DzStyledButton::BCustom );
    with these variants: BCommand, BTool, BDefault, BBasic, BNoFrame

     

    CornerButtonStyle.png
    122 x 53 - 1K
    myButton.png
    95 x 44 - 1K
  • rbtwhizrbtwhiz Posts: 2,250
    edited April 2019
    m_pPlayButton = new DzStyledButton( tr( "Play" ) );m_pPlayButton->setObjectName( name + "PlayBtn" );m_pPlayButton->setCustomPrimitive( DZ_PE_SpecialInterestButton );m_pPlayButton->setCustomTextStyle( DZ_TS_SpecialInterestButton );

    (NOTE: All widgets should have a unique objectName set on them so that the Inline Help and Interactive Lesson systems can identify/locate them - "name" above should be a legalized CamelCase version of your pane name/label.)

    -Rob

    Post edited by rbtwhiz on
  • DobitDobit Posts: 181

    Many Thanks. That's how it works perfectly.

Sign In or Register to comment.