User login history visualized with pyqt

The name of the pictureThe name of the pictureThe name of the pictureClash 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







share|improve this question

















  • 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
















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







share|improve this question

















  • 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












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







share|improve this question













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









share|improve this question












share|improve this question




share|improve this question








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












  • 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















active

oldest

votes











Your Answer




StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
);
);
, "mathjax-editing");

StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "196"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















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



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














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













































































Popular posts from this blog

Greedy Best First Search implementation in Rust

Function to Return a JSON Like Objects Using VBA Collections and Arrays

C++11 CLH Lock Implementation