Results 1 to 2 of 2

Thread: Qt Designer Batch Editing Stylesheets

  1. #1
    Join Date
    Aug 2024
    Posts
    2
    Qt products
    Platforms
    Windows

    Default Qt Designer Batch Editing Stylesheets

    Hey All,

    I have designed a GUI within QtDesigner. It uses various components such as QLineEdit, QTextEdit, QDateEdit, QComboBox etc. All of these elements have their own individual Stylesheet that I have assigned them by right-clicking on the element and then clicking 'Change styleSheet. . .'

    I am now wanting to update the overall style of the GUI with certain colours being replaced. Is there a way to batch-edit Stylesheets for all elements in one go? I know I can click multiple of the same element type and alter that stylesheet which works to change the overall style for those selected items but I have multiple pages and so it seems impossible to select all of the same type of element and one time to do any type of batch editing.

    I have also seen trying to create a style.qss file and load it into my Python application but this didn't work correctly either and caused other parts of the application to be incorrect.

    Any help or assistance anyone can offer would be greatly appreciated.

    Kind Regards,
    Chris

  2. #2
    Join Date
    Mar 2025
    Posts
    1
    Qt products
    Platforms
    Windows

    Default Re: Qt Designer Batch Editing Stylesheets

    Quote Originally Posted by Kingston86 View Post
    Hey All,

    I have designed a GUI within QtDesigner. It uses various components such as QLineEdit, QTextEdit, QDateEdit, QComboBox etc. All of these elements have their own individual Stylesheet that I have assigned them by right-clicking on the element and then clicking 'Change styleSheet. . .'

    I am now wanting to update the overall style of the GUI with certain colours being replaced. Is there a way to batch-edit Stylesheets for all elements in one go? I know I can click multiple of the same element type and alter that stylesheet which works to change the overall style for those selected items but I have multiple pages and so it seems impossible to select all of the same type of element and one time to do any type of batch editing.

    I have also seen trying to create a style.qss file and load it into my Python application but this didn't work correctly either and caused other parts of the application to be incorrect.

    Any help or assistance anyone can offer would be greatly appreciated.

    Kind Regards,
    Chris
    Instead of setting stylesheets for each individual component in Qt Designer, you can set a global stylesheet for the entire application in the Python code.

Similar Threads

  1. Qt Designer Batch Editing Stylesheets
    By Kingston86 in forum Newbie
    Replies: 1
    Last Post: 21st April 2025, 10:58
  2. batch file
    By sroy in forum Newbie
    Replies: 1
    Last Post: 21st January 2016, 05:45
  3. How to ran a batch file script using cmd?
    By kiboi in forum General Programming
    Replies: 3
    Last Post: 6th February 2013, 09:11
  4. Problem Editing Resources with Qt Designer
    By demonGeek in forum Qt Tools
    Replies: 1
    Last Post: 26th January 2011, 05:04
  5. distclean batch file
    By talk2amulya in forum Qt Programming
    Replies: 0
    Last Post: 11th April 2009, 12:19

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.