⚠️ Forum Maintenance: Feb 6th, 8am - 14pm (UTC+2)

Questions about QWizard in PyQt

  • Hello, I am using the QWizard and I need to leave the background screen black, but when I made the buttons are gone because they were black as well, how can I leave them in their normal colors?
    And how can I add the buttons to maximize and minimize?
    And how can I change the title of the window every screen?

    My screen generated to illustrate

    My program test using PyQt:

    from PyQt4.QtCore import *
    from PyQt4.QtGui import *
    import sys
    from ptela import *
    from stela import *
    class Main(QWizard):
        def __init__(self, parent=None):
    	    super(Main, self).__init__(parent)
    class Pagina1(QWizardPage, Ui_Form):
        def __init__(self, parent = None):
    	    super(Pagina1, self).__init__(parent)
    class Pagina2(QWizardPage, Ui_Form2):
        def __init__(self, parent = None):
    	    super(Pagina2, self).__init__(parent)
    root = QApplication(sys.argv)
    app = Main()

  • Lifetime Qt Champion


    Be more specific with your style sheet. What you currently have can be summed up to : all widgets of the application must have a black background color.

  • @SGaist I understood, how can I set for only the screen goes black and any other widget remain with the normal background?

  • Lifetime Qt Champion

    Taking a look at the Style Sheet documentation would have been faster.

    QWizard {
        background-color: black;

  • @SGaist Thanks

Log in to reply