Skip to content

Instantly share code, notes, and snippets.

@Kristian-Roopnarine
Created September 30, 2019 23:02
Show Gist options
  • Save Kristian-Roopnarine/977b9270f18ae61aefa279224ee99577 to your computer and use it in GitHub Desktop.
Save Kristian-Roopnarine/977b9270f18ae61aefa279224ee99577 to your computer and use it in GitHub Desktop.
def add_label(self,user_info):
self.usernameLabel = QtWidgets.QLabel('Username: %s ' % (user_info[0]))
self.passwordLabel = QtWidgets.QLabel('Password: %s' % (user_info[1]))
self.websiteLabel = QtWidgets.QLabel('Website: %s' % (user_info[2]))
font = QtGui.QFont()
font.setPointSize(12)
self.usernameLabel.setFont(font)
self.passwordLabel.setFont(font)
self.websiteLabel.setFont(font)
h_box = QtWidgets.QHBoxLayout()
h_box.addWidget(self.usernameLabel)
h_box.addWidget(self.passwordLabel)
h_box.addWidget(self.websiteLabel)
return h_box
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment