[Interest] Is the order of styles within a Qt stylesheet significant?

Atlant Schmidt aschmidt at dekaresearch.com
Thu Aug 23 15:28:22 CEST 2012


Folks:

  Is the order of styles and sub-styles within a Qt stylesheet ever
  significant?

  For example (see below), if I had a variety of paragraphs describing
  the various types, sub-controls, and states of a widget class, does it
 ever make any difference in which order those paragraphs appear?
  Or does Qt sort-out all of the more- and less-specific paragraphs,
  doing all of the correct inheritance ("cascading")?

                                 Atlant

________________________________

QPushButton[type="Checkable"]:checked
{
    image: url(:/icons/checkmark_green_small.png);
    image-position: left;
}

QCheckBox[type="YesNoConfirm"]::indicator:checked
{
    image: url(:/icons/checkmark_green.png);
}

QCheckBox[type="YesNoConfirm"]::indicator:unchecked
{
    image: none;
}

QCheckBox[type="YesNoConfirm"]:checked
{
    border-image: url(:/buttons/button_down.png) 30px 36px 31px 34px stretch;
    padding-top: 3px;
}

QCheckBox[type="YesNoConfirm"]:pressed
{
    border-image: url(:/buttons/button_down.png) 30px 36px 31px 34px stretch;
    padding-top: 3px;
}

QCheckBox[type="YesNoConfirm"]:unchecked
{
    padding-left: 27px;
}

QPushButton
{
    border-image: url(:/buttons/button_up.png)  30px 36px 31px 34px stretch;
    border-top-width:    30px;
    border-right-width:  36px;
    border-bottom-width: 31px;
    border-left-width:   34px;
    padding-top:    -30px;
    padding-bottom: -31px;
    padding-left:     0px;
    font: bold 32px;
    color: white;
}

QPushButton:checked
{
    border-image: url(:/buttons/button_down.png) 30px 36px 31px 34px stretch;
    padding-top: -28px;
    padding-left:  2px;
}

QPushButton:pressed
{
    border-image: url(:/buttons/button_down.png) 30px 36px 31px 34px stretch;
    padding-top: -28px;
    padding-left:  2px;
}

QPushButton:disabled
{
    border-image: url(:/buttons/button_disabled.png) 30px 36px 31px 34px stretch;
}



________________________________
This e-mail and the information, including any attachments, it contains are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message.

Thank you.

Please consider the environment before printing this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120823/c5558119/attachment.html>


More information about the Interest mailing list