Results 1 to 1 of 1

Thread: Stylesheets on QSplashScreen

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2006
    Location
    Argentina - CABA
    Posts
    66
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Platforms
    Unix/X11

    Default Stylesheets on QSplashScreen

    Hi Guys!!

    I have a weird problem with stylesheets in QSplashScreen.

    When i explicit specify/set the stylesheet to the QSplashScreen widgets (indeed i am only styling an QProgressBar inside of it...) it works perfect.

    But now, to simplify the implementation of the stylesheet and to not tell every single UI class which one to use, I am applying in the hole app using the qss file method , this is in __main__:

    Qt Code:
    1. if __name__ == "__main__":
    2. app = QApplication(sys.argv)
    3. ....
    4. styleSheetFile = QFile ("images/OpenCoffee_style.qss")
    5. styleSheetFile.open(QFile.ReadOnly)
    6. defaultStylesheet = QString(QLatin1String(styleSheetFile.readAll()))
    7. app.setStyleSheet(defaultStylesheet)
    To copy to clipboard, switch view to plain text mode 
    ...

    And with that the hole stylesheet is being applied to my app.
    But no for the splashScreen... and that is weird... cause only there does not works.

    I am attaching the splashScreen, if someone could help me here.

    By the way, I call splash screen in my QMainWindow simply with:

    Qt Code:
    1. self.splashScreen = splashScreen()
    To copy to clipboard, switch view to plain text mode 

    Just in case, the QProgressBar stylesheet (which WORKS by the way...):

    Qt Code:
    1. QProgressBar:horizontal {
    2. color: #ffffff;
    3. text-align: center;
    4. font-weight: bold;
    5. border-image: url(:/Styles/styles/progressBarBg.png) 1 4 1 4 stretch stretch;
    6. border-width: 1px 4px 1px 4px;
    7. padding-left:-3px;
    8. padding-right: -3px;}
    9. QProgressBar::chunk:horizontal {
    10. border-image: url(:/Styles/styles/progressBar.png) 0 10 0 10 stretch;
    11. border-width: 0px 10px 0px 10px;}
    To copy to clipboard, switch view to plain text mode 

    NOTE: as you mat notice, I code with PyQt...

    Cheers and thanks in advance.
    Attached Files Attached Files
    Last edited by GuS; 16th July 2008 at 18:25.
    Gustavo A. DÃ*az
    artistic.gdnet.com.ar

Similar Threads

  1. StyleSheets: border-image performance
    By GuS in forum Qt Programming
    Replies: 3
    Last Post: 15th May 2013, 12:42
  2. QScrollbar Stylesheets problems in Qt4.4
    By GuS in forum Qt Programming
    Replies: 2
    Last Post: 6th September 2008, 20:37
  3. button with backgr and icon using stylesheets
    By s_p_t10 in forum Qt Programming
    Replies: 0
    Last Post: 7th May 2008, 20:19
  4. QSplashScreen Weirdness
    By mclark in forum Qt Programming
    Replies: 11
    Last Post: 19th November 2007, 06:49
  5. Problem mit Stylesheets
    By momesana in forum Qt Programming
    Replies: 1
    Last Post: 10th November 2006, 20:41

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
  •  
Qt is a trademark of The Qt Company.