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

Questions about QWizard in PyQt

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 1.3k 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 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
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on 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
      0
      • SGaistS SGaist

        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 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
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by SGaist
          #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
          1
          • SGaistS SGaist

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

            QWizard {
                background-color: black;
            }
            
            P Offline
            P Offline
            Pedro_Monteiro
            wrote on last edited by
            #5

            @SGaist Thanks

            1 Reply Last reply
            0

            • Login

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