PDA

View Full Version : "setStyleSheet" can work in QT4.3.3 but can't work in QT4.3.0!



bzjbest
14th January 2008, 08:44
---------------------------------------------------------------------------------


FloatBar::FloatBar(QWidget *parent) : QFrame(parent)
{

setWindowFlags(Qt::Tool | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
setObjectName("FloatBar");
setStyleSheet(
"#FloatBar{background:qlineargradient(x1:0,y1:0,x2: 0,y2:1,stop:0 #eee,stop:0.1 #fff,stop:0.9 #ccc,stop:1 #444);}"
"QToolButton{margin-right:2px;padding:1px;}"
"ZWordBox{padding:0;margin:0 3px;min-height:17px;border:1px solid gray;border-radius:3px;background:qlineargradient(x1:0,y1:0,x2 :0,y2:1,stop:0 #eee,stop:1 #fff);}"
"ZWordBox *{padding:0;margin:0 3px;font-family:Tahoma;font-size:14px;color:#555;background:qlineargradient(x1 :0,y1:0,x2:0,y2:1,stop:0 #eee,stop:1 #fff);}"
"ZWordBox QLineEdit{border:0px none;color:#07b;}"
);
}

The Storm
14th January 2008, 12:58
Why not just keep yourself up to date ?
No one will give support for outdated version.

bzjbest
15th January 2008, 02:29
Why not just keep yourself up to date ?
No one will give support for outdated version.

But the device installed QT4.3.0 before.:(

bzjbest
15th January 2008, 13:11
I got the answer.

QT4.3.3:Sets the QFrame::frameStyle property to QFrame::StyledPanel automatically.
But QT4.3.0 not.
So after setting the QFrame::frameStyle property to QFrame::StyledPanel ,it works well on QT4.3.0.