Results 1 to 3 of 3

Thread: Which widges does setStyle influence? (PySide)

  1. #1
    Join Date
    Jun 2014
    Posts
    98
    Thanks
    43
    Thanked 4 Times in 4 Posts
    Platforms
    Windows

    Red face Which widges does setStyle influence? (PySide)

    When you use setStyle, which types of Widgets will it affect? It seems to do nothing with a bare QLabel widget, as I documented here (and which I thought was an error):
    http://stackoverflow.com/questions/2...in-pyside-pyqt

    Is there documentation on this somewhere, or is this something I should just find by trial and error?

    And is this the best-practices way to change style in PySide?
    Qt Code:
    1. QtGui.QApplication.setStyle(QtGui.QStyleFactory.create('Cleanlooks'))
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Which widges does setStyle influence? (PySide)

    The application style should affect all widgets.

    However, depending on the type of widget the changes could be very small or not exist at all.

    Have a look at the Qt Widget gallery: http://qt-project.org/doc/qt-4.8/gallery.html

    Cheers,
    _

  3. The following user says thank you to anda_skoa for this useful post:

    neuronet (12th June 2014)

  4. #3
    Join Date
    Jun 2014
    Posts
    98
    Thanks
    43
    Thanked 4 Times in 4 Posts
    Platforms
    Windows

    Default Re: Which widges does setStyle influence? (PySide)

    Thanks for the link! I guess for a single widget that just contains a label it doesn't show up, but once you have buttons and such within a widget it will have an influence. Thanks again.

Similar Threads

  1. setstyle problem
    By melody:p in forum Qt Programming
    Replies: 2
    Last Post: 18th September 2012, 05:47
  2. Replies: 3
    Last Post: 13th March 2012, 11:50
  3. Replies: 5
    Last Post: 8th March 2012, 11:50
  4. Pyside needs QT?
    By junichiro in forum Installation and Deployment
    Replies: 0
    Last Post: 30th July 2011, 15:13
  5. How widges communicate between projects?
    By yxtx1984 in forum Newbie
    Replies: 1
    Last Post: 12th January 2010, 14:22

Tags for this Thread

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.