How can the type name of the cascade button be passed to the popup?

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
Search

Post Reply
1 post • Page 1 of 1
philipp.wechsler
Posts: 13
Joined: Tue May 17, 2016 2:27 pm

How can the type name of the cascade button be passed to the popup?

Post by philipp.wechsler »

How can the type name of the cascade button be passed on? So that the popup has the same style as the parent panel?
If the cascade button is combined with the editor, the style is defined for all of them. If popups are added during initialization, the style will not be adopted.

Initialize cascade button:

Code: Select all

main()
{
  this.insertItemId( "", CB_POPUP, -1, "4", "Submenue 4" );
  for( int i = 5; i <= 7; i++ )
  {
    this.insertItemId( "4", CB_ITEM, -1,  i, "Item " + i );
  }
}
stylesheet:

Code: Select all

QMenu[type = "STYLE_NAV"]::item
{
  color: black;
  height: 30px;
  padding: 2px 30px 2px 20px;
  border: 1px solid transparent;
}


QMenu[type = "STYLE_NAV"]::item:selected
{
  border-color: rgb(0, 173, 165);
  background-color: rgba(0, 173, 165, 127);
  color: white;
}


QMenu[type = "STYLE_NAV"]::item:selected:disabled
{
  border-color: rgba(0, 209, 153, 32);
  background-color: rgba(0, 209, 153, 32);
  color: rgb(128, 128, 128);
}


QMenu[type = "STYLE_NAV"]::item:disabled
{
  border-color: rgb(204, 204, 204);
  background-color: rgb(204, 204, 204);
  color: rgb(128, 128, 128);
}

QMenu[type = "STYLE_NAV"]::separator {
    height: 2px;
    background: rgb(0, 173, 165);
    margin-left: 10px;
    margin-right: 5px;
}

Post Reply
1 post • Page 1 of 1