Results 1 to 4 of 4

Thread: "setStyleSheet" can work in QT4.3.3 but can't work in QT4.3.0!

  1. #1
    Join Date
    Jan 2008
    Posts
    6
    Thanks
    1

    Default "setStyleSheet" can work in QT4.3.3 but can't work in QT4.3.0!

    ---------------------------------------------------------------------------------

    Qt Code:
    1. FloatBar::FloatBar(QWidget *parent) : QFrame(parent)
    2. {
    3.  
    4. setWindowFlags(Qt::Tool | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
    5. setObjectName("FloatBar");
    6. setStyleSheet(
    7. "#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);}"
    8. "QToolButton{margin-right:2px;padding:1px;}"
    9. "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);}"
    10. "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);}"
    11. "ZWordBox QLineEdit{border:0px none;color:#07b;}"
    12. );
    13. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by jpn; 17th January 2008 at 07:38. Reason: missing [code] tags

  2. #2
    Join Date
    Aug 2007
    Posts
    166
    Thanks
    16
    Thanked 14 Times in 14 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: "setStyleSheet" can work in QT4.3.3 but can't work in QT4.3.0!

    Why not just keep yourself up to date ?
    No one will give support for outdated version.

  3. #3
    Join Date
    Jan 2008
    Posts
    6
    Thanks
    1

    Default Re: "setStyleSheet" can work in QT4.3.3 but can't work in QT4.3.0!

    Quote Originally Posted by The Storm View Post
    Why not just keep yourself up to date ?
    No one will give support for outdated version.
    But the device installed QT4.3.0 before.

  4. #4
    Join Date
    Jan 2008
    Posts
    6
    Thanks
    1

    Default Re: "setStyleSheet" can work in QT4.3.3 but can't work in QT4.3.0!

    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.
    Last edited by bzjbest; 15th January 2008 at 13:20.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.