Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Password entered not able to retrieve
Forum Updated to NodeBB v4.3 + New Features

Password entered not able to retrieve

Scheduled Pinned Locked Moved General and Desktop
12 Posts 4 Posters 3.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    shankarraj
    wrote on last edited by
    #3

    I have set echo mode as QLineEdit::Password for lineedit control used for password entry.

    1 Reply Last reply
    0
    • L Offline
      L Offline
      lgeyer
      wrote on last edited by
      #4

      Fine. Do you have an event loop running?

      1 Reply Last reply
      0
      • S Offline
        S Offline
        shankarraj
        wrote on last edited by
        #5

        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.

        1 Reply Last reply
        0
        • L Offline
          L Offline
          lgeyer
          wrote on last edited by
          #6

          processEvents() processes events once, not continuously. In order to have signals and slots working you will have to either

          • call processEvents() continuously or
          • enter an event loop using exec()
          1 Reply Last reply
          0
          • G Offline
            G Offline
            goetz
            wrote on last edited by
            #7

            Have a look at [[Doc:QInputDialog]] - looks more sufficient for your use case. As long as your application event loop is not running, I would not bet on any signals/slots working.

            http://www.catb.org/~esr/faqs/smart-questions.html

            1 Reply Last reply
            0
            • S Offline
              S Offline
              shankarraj
              wrote on last edited by
              #8

              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.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                shankarraj
                wrote on last edited by
                #9

                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]

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  goetz
                  wrote on last edited by
                  #10

                  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.

                  http://www.catb.org/~esr/faqs/smart-questions.html

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    Kewal
                    wrote on last edited by
                    #11

                    Yes, instead of splash screen a widget can be customized to behave the way a splash screen works and still achieve the same functionality.after all, its just that QSplash remains always on the top, you can achieve it in your custom widget

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      shankarraj
                      wrote on last edited by
                      #12

                      I want to display image in a widget. Can you give me some sample code to do this.

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved