本文整理汇总了C++中StyleSheet::buildIndexes方法的典型用法代码示例。如果您正苦于以下问题:C++ StyleSheet::buildIndexes方法的具体用法?C++ StyleSheet::buildIndexes怎么用?C++ StyleSheet::buildIndexes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StyleSheet
的用法示例。
在下文中一共展示了StyleSheet::buildIndexes方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getDefaultStyleSheet
//.........这里部分代码省略.........
ADD_STYLE_RULE;
}
/*QHeaderView {
-qt-background-role: window;
}*/
{
SET_ELEMENT_NAME(QLatin1String("QHeaderView"));
ADD_BASIC_SELECTOR;
ADD_SELECTOR;
SET_PROPERTY(QLatin1String("-qt-background-role"), QtBackgroundRole);
ADD_VALUE(Value::KnownIdentifier, Value_Window);
ADD_DECLARATION;
ADD_STYLE_RULE;
}
/*QTableCornerButton::section, QHeaderView::section {
-qt-background-role: button;
-qt-style-features: background-color; //if style is not pixmap based
border: native;
}*/
{
SET_ELEMENT_NAME(QLatin1String("QTableCornerButton"));
ADD_PSEUDO(QLatin1String("section"), PseudoClass_Unknown);
ADD_BASIC_SELECTOR;
ADD_SELECTOR;
SET_ELEMENT_NAME(QLatin1String("QHeaderView"));
ADD_PSEUDO(QLatin1String("section"), PseudoClass_Unknown);
ADD_BASIC_SELECTOR;
ADD_SELECTOR;
SET_PROPERTY(QLatin1String("-qt-background-role"), QtBackgroundRole);
ADD_VALUE(Value::KnownIdentifier, Value_Button);
ADD_DECLARATION;
if (!styleIsPixmapBased) {
SET_PROPERTY(QLatin1String("-qt-style-features"), QtStyleFeatures);
ADD_VALUE(Value::Identifier, QString::fromLatin1("background-color"));
ADD_DECLARATION;
}
SET_PROPERTY(QLatin1String("border"), Border);
ADD_VALUE(Value::KnownIdentifier, Value_Native);
ADD_DECLARATION;
ADD_STYLE_RULE;
}
/*QProgressBar {
-qt-background-role: base;
}*/
{
SET_ELEMENT_NAME(QLatin1String("QProgressBar"));
ADD_BASIC_SELECTOR;
ADD_SELECTOR;
SET_PROPERTY(QLatin1String("-qt-background-role"), QtBackgroundRole);
ADD_VALUE(Value::KnownIdentifier, Value_Base);
ADD_DECLARATION;
ADD_STYLE_RULE;
}
/*QScrollBar {
-qt-background-role: window;
}*/
{
SET_ELEMENT_NAME(QLatin1String("QScrollBar"));
ADD_BASIC_SELECTOR;
ADD_SELECTOR;
SET_PROPERTY(QLatin1String("-qt-background-role"), QtBackgroundRole);
ADD_VALUE(Value::KnownIdentifier, Value_Window);
ADD_DECLARATION;
ADD_STYLE_RULE;
}
/*QDockWidget {
border: native;
}*/
{
SET_ELEMENT_NAME(QLatin1String("QDockWidget"));
ADD_BASIC_SELECTOR;
ADD_SELECTOR;
SET_PROPERTY(QLatin1String("border"), Border);
ADD_VALUE(Value::KnownIdentifier, Value_Native);
ADD_DECLARATION;
ADD_STYLE_RULE;
}
sheet.origin = StyleSheetOrigin_UserAgent;
sheet.buildIndexes();
return sheet;
}