User login history visualized with pyqt
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
0
down vote
favorite
I have been recently using Python and pyqt for UI design. Currently I am creating a popup screen where the user will select their name and click login to proceed further to use any application. My aim is to have a history of user logins stored as a collection (perhaps a list) for further manipulation.
The basic code related to the popup screen:
class Login(QDialog):
def __init__(self, parent=None):
self.contributors=['','A','B','C']
super(Login, self).__init__(parent)
self.nameLabel=QLabel(self)
self.nameLabel.setText("Select Your name")
self.nameLabel.setAlignment(Qt.AlignHCenter)
self.cb=QComboBox(self)
self.cb.setGeometry(QRect(40,40,491, 31))
self.cb.setObjectName(("comboBox"))
self.cb.addItems(self.contributors)
self.cb.currentIndexChanged.connect(self.getEditor)
self.buttonLogin = QPushButton('Login', self)
self.buttonLogin.clicked.connect(self.close)
layout = QVBoxLayout(self)
layout.addWidget(self.nameLabel)
layout.addWidget(self.cb)
layout.addWidget(self.buttonLogin)
self.resize(600,150)
self.exec_()
def getEditor(self):
text=str(self.cb.currentText())
return text
if __name__ == '__main__':
app = QApplication(sys.argv)
login=Login()
Currently I am storing a text file with all the names selected from the combo box and manipulating it. Is there an alternative way to get a list of users who used the tool? I am trying to avoid creation of an extra text file.
I originally posted the question on StackOverflow, but reposted based on a comment there
python pyqt
add a comment |Â
up vote
0
down vote
favorite
I have been recently using Python and pyqt for UI design. Currently I am creating a popup screen where the user will select their name and click login to proceed further to use any application. My aim is to have a history of user logins stored as a collection (perhaps a list) for further manipulation.
The basic code related to the popup screen:
class Login(QDialog):
def __init__(self, parent=None):
self.contributors=['','A','B','C']
super(Login, self).__init__(parent)
self.nameLabel=QLabel(self)
self.nameLabel.setText("Select Your name")
self.nameLabel.setAlignment(Qt.AlignHCenter)
self.cb=QComboBox(self)
self.cb.setGeometry(QRect(40,40,491, 31))
self.cb.setObjectName(("comboBox"))
self.cb.addItems(self.contributors)
self.cb.currentIndexChanged.connect(self.getEditor)
self.buttonLogin = QPushButton('Login', self)
self.buttonLogin.clicked.connect(self.close)
layout = QVBoxLayout(self)
layout.addWidget(self.nameLabel)
layout.addWidget(self.cb)
layout.addWidget(self.buttonLogin)
self.resize(600,150)
self.exec_()
def getEditor(self):
text=str(self.cb.currentText())
return text
if __name__ == '__main__':
app = QApplication(sys.argv)
login=Login()
Currently I am storing a text file with all the names selected from the combo box and manipulating it. Is there an alternative way to get a list of users who used the tool? I am trying to avoid creation of an extra text file.
I originally posted the question on StackOverflow, but reposted based on a comment there
python pyqt
1
(Be wary of recommendations to post on a forum you don't know not referring you to a summary of what's on-topic (and be careful doing same).)
â greybeard
Mar 20 at 15:54
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have been recently using Python and pyqt for UI design. Currently I am creating a popup screen where the user will select their name and click login to proceed further to use any application. My aim is to have a history of user logins stored as a collection (perhaps a list) for further manipulation.
The basic code related to the popup screen:
class Login(QDialog):
def __init__(self, parent=None):
self.contributors=['','A','B','C']
super(Login, self).__init__(parent)
self.nameLabel=QLabel(self)
self.nameLabel.setText("Select Your name")
self.nameLabel.setAlignment(Qt.AlignHCenter)
self.cb=QComboBox(self)
self.cb.setGeometry(QRect(40,40,491, 31))
self.cb.setObjectName(("comboBox"))
self.cb.addItems(self.contributors)
self.cb.currentIndexChanged.connect(self.getEditor)
self.buttonLogin = QPushButton('Login', self)
self.buttonLogin.clicked.connect(self.close)
layout = QVBoxLayout(self)
layout.addWidget(self.nameLabel)
layout.addWidget(self.cb)
layout.addWidget(self.buttonLogin)
self.resize(600,150)
self.exec_()
def getEditor(self):
text=str(self.cb.currentText())
return text
if __name__ == '__main__':
app = QApplication(sys.argv)
login=Login()
Currently I am storing a text file with all the names selected from the combo box and manipulating it. Is there an alternative way to get a list of users who used the tool? I am trying to avoid creation of an extra text file.
I originally posted the question on StackOverflow, but reposted based on a comment there
python pyqt
I have been recently using Python and pyqt for UI design. Currently I am creating a popup screen where the user will select their name and click login to proceed further to use any application. My aim is to have a history of user logins stored as a collection (perhaps a list) for further manipulation.
The basic code related to the popup screen:
class Login(QDialog):
def __init__(self, parent=None):
self.contributors=['','A','B','C']
super(Login, self).__init__(parent)
self.nameLabel=QLabel(self)
self.nameLabel.setText("Select Your name")
self.nameLabel.setAlignment(Qt.AlignHCenter)
self.cb=QComboBox(self)
self.cb.setGeometry(QRect(40,40,491, 31))
self.cb.setObjectName(("comboBox"))
self.cb.addItems(self.contributors)
self.cb.currentIndexChanged.connect(self.getEditor)
self.buttonLogin = QPushButton('Login', self)
self.buttonLogin.clicked.connect(self.close)
layout = QVBoxLayout(self)
layout.addWidget(self.nameLabel)
layout.addWidget(self.cb)
layout.addWidget(self.buttonLogin)
self.resize(600,150)
self.exec_()
def getEditor(self):
text=str(self.cb.currentText())
return text
if __name__ == '__main__':
app = QApplication(sys.argv)
login=Login()
Currently I am storing a text file with all the names selected from the combo box and manipulating it. Is there an alternative way to get a list of users who used the tool? I am trying to avoid creation of an extra text file.
I originally posted the question on StackOverflow, but reposted based on a comment there
python pyqt
edited Mar 20 at 15:33
ComFreek
608617
608617
asked Mar 20 at 15:25
UserA
11
11
1
(Be wary of recommendations to post on a forum you don't know not referring you to a summary of what's on-topic (and be careful doing same).)
â greybeard
Mar 20 at 15:54
add a comment |Â
1
(Be wary of recommendations to post on a forum you don't know not referring you to a summary of what's on-topic (and be careful doing same).)
â greybeard
Mar 20 at 15:54
1
1
(Be wary of recommendations to post on a forum you don't know not referring you to a summary of what's on-topic (and be careful doing same).)
â greybeard
Mar 20 at 15:54
(Be wary of recommendations to post on a forum you don't know not referring you to a summary of what's on-topic (and be careful doing same).)
â greybeard
Mar 20 at 15:54
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f190042%2fuser-login-history-visualized-with-pyqt%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
(Be wary of recommendations to post on a forum you don't know not referring you to a summary of what's on-topic (and be careful doing same).)
â greybeard
Mar 20 at 15:54