Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt Academy Launch in California!

    Solved Questions about QWizard in PyQt

    General and Desktop
    2
    5
    1123
    Loading More Posts
    • 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
      Pedro_Monteiro last edited by

      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 Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        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 Reply Quote 0
        • P
          Pedro_Monteiro @SGaist last edited by

          @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 Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by SGaist

            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 Reply Quote 1
            • P
              Pedro_Monteiro @SGaist last edited by

              @SGaist Thanks

              1 Reply Last reply Reply Quote 0
              • First post
                Last post