Advertisement
Guest User

Untitled

a guest
Dec 18th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.04 KB | None | 0 0
  1. class AboutPopup(QWidget):
  2.     """
  3.    Widget class to show the About popup
  4.    """
  5.     def __init__(self):
  6.         super(AboutPopup, self).__init__()
  7.  
  8.         self.setWindowTitle("About")
  9.         self.setFixedWidth(300)
  10.  
  11.         layout = QGridLayout(self)
  12.  
  13.         # Create label to display the application icon
  14.         self.image = QLabel(self)
  15.         self.image.setPixmap(QPixmap("img/tools.png"))
  16.         self.image.setAlignment(Qt.AlignCenter)
  17.  
  18.         # Create label to display the application version
  19.         self.version = QLabel(self)
  20.         self.version.setText("Version 1.0.1")
  21.         self.version.setAlignment(Qt.AlignCenter)
  22.  
  23.         # Create label to display the application author
  24.         self.author = QLabel(self)
  25.         self.author.setText("Developed by Flora Huot")
  26.         self.author.setAlignment(Qt.AlignCenter)
  27.  
  28.         # Arrange labels in the grid layout
  29.         layout.addWidget(self.image, 0, 0, 1, 4)
  30.         layout.addWidget(self.version, 1, 0, 1, 4)
  31.         layout.addWidget(self.author, 3, 0, 1, 4)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement