Password entered not able to retrieve
-
i am displaying a splash screen in my application. I am showing application initialization using progress bar. Once progress reaches some level: I am asking user to enter password.Displaying password control using LineEdit control. Trying to get entered password in editingFinished() signal. But after entering password: control not at all coming to slot related to editingFinished() signal.Waiting for help.
-
I have set echo mode as QLineEdit::Password for lineedit control used for password entry.
-
I added a.processEvents(); where a is QApplication a.
I have QSplashScreen derived class where I create progressbar & password & update progress of progress bar based on initialization of classes. When progress reaches some % level: I display the password control to user. He will enter password & on authentication: next window gets displayed.In splashscreen derived class I create: connect(lineEdit, SIGNAL(editingFinished()), this, SLOT(PasswordEntered()));[ signal & slot for password control]. Here: QLineEdit* lineEdit.If you need any further info: pls let me know.
-
i am calling processEvents() in my main() like
a.processEvents(); where a is QApplication object. In my QSPlashScreen derived class I am implementing progressbar & password controls dynamically.when progressbar progress level reaches some level say 70% I am showing password control.[Using QLineEdit] User enters password and then on authentication: control takes him to main window.My query is: where will I have to call processEvents() continuously. Is it in main() or is it in Splashscreen derived class? Please let me know. If you need any further inputs please let me know. -
I am trying to use following code for password.
@
QString stPassword = QInputDialog::getText(this, tr("QInputDialog::getText()"),
tr("Password:"), QLineEdit::Password ,
0, &ok,Qt::FramelessWindowHint);
@After password is verified: how to close input dialog on click of OK button here.
[EDIT: code formatting, please use @-tags, Volker]
-
A QInputDialog is closed automatically after pressing enter or clicking on the ok or cancel button, there shouldn't be a problem here.
Splash screens in general are not suitable for asking the user for input. A splash screen usually is dismissed when someone clicks on it. If you need something more sophisticated, I would suggest to implement your own startup widget.
-
I want to display image in a widget. Can you give me some sample code to do this.