Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Questions about QWizard in PyQt
Forum Update on Monday, May 27th 2025

Questions about QWizard in PyQt

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 1.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Pedro_Monteiro
    wrote on 10 Nov 2015, 22:53 last edited by
    #1

    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)
    	    self.addPage(Pagina1(self))
    	    self.addPage(Pagina2(self))
    	    self.showMaximized()
    
    class Pagina1(QWizardPage, Ui_Form):
        def __init__(self, parent = None):
    	    super(Pagina1, self).__init__(parent)
    	    self.setupUi(self)
    
    class Pagina2(QWizardPage, Ui_Form2):
        def __init__(self, parent = None):
    	    super(Pagina2, self).__init__(parent)
    	    self.setupUi(self)
    
    root = QApplication(sys.argv)
    app = Main()
    app.setStyleSheet("background-color:black;")
    app.show()
    root.exec_()
    
    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 10 Nov 2015, 22:59 last edited by
      #2

      Hi,

      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.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      P 1 Reply Last reply 11 Nov 2015, 07:15
      0
      • S SGaist
        10 Nov 2015, 22:59

        Hi,

        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.

        P Offline
        P Offline
        Pedro_Monteiro
        wrote on 11 Nov 2015, 07:15 last edited by
        #3

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

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 11 Nov 2015, 11:11 last edited by SGaist 11 Nov 2015, 11:11
          #4

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

          QWizard {
              background-color: black;
          }
          

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          P 1 Reply Last reply 17 Nov 2015, 21:15
          1
          • S SGaist
            11 Nov 2015, 11:11

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

            QWizard {
                background-color: black;
            }
            
            P Offline
            P Offline
            Pedro_Monteiro
            wrote on 17 Nov 2015, 21:15 last edited by
            #5

            @SGaist Thanks

            1 Reply Last reply
            0

            1/5

            10 Nov 2015, 22:53

            • Login

            • Login or register to search.
            1 out of 5
            • First post
              1/5
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved