Kampfgnom
14th December 2011, 08:02
Hi,
I came across a weird behaviour in Qt 4.7.4 on Mac OS X Lion 10.7.2.
I have a QSS file as a Qt resource and set it on an QTreeView like:
QFile stylesheet(QLatin1String(":/sidebar/macos_lionmail/stylesheet"));
stylesheet.open(QFile::ReadOnly);
m_treeView->setStyleSheet(stylesheet.readAll());
The first of the two following stylesheets works (and btw resembles the Mail.app sidebar background on Lion), the second does nothing:
QTreeView {
background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(238, 240, 244, 255), stop:1 rgba(210, 216, 224, 255) ); /* works */
}
QTreeView {
background-color: qlineargradient( spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(238, 240, 244, 255), stop:1 rgba(210, 216, 224, 255) ); /* fails */
}
Now someone tell me that this ist wanted behaviour! Discuss :-)
I came across a weird behaviour in Qt 4.7.4 on Mac OS X Lion 10.7.2.
I have a QSS file as a Qt resource and set it on an QTreeView like:
QFile stylesheet(QLatin1String(":/sidebar/macos_lionmail/stylesheet"));
stylesheet.open(QFile::ReadOnly);
m_treeView->setStyleSheet(stylesheet.readAll());
The first of the two following stylesheets works (and btw resembles the Mail.app sidebar background on Lion), the second does nothing:
QTreeView {
background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(238, 240, 244, 255), stop:1 rgba(210, 216, 224, 255) ); /* works */
}
QTreeView {
background-color: qlineargradient( spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(238, 240, 244, 255), stop:1 rgba(210, 216, 224, 255) ); /* fails */
}
Now someone tell me that this ist wanted behaviour! Discuss :-)