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. how to map a enter key to a QPushbutton
Forum Updated to NodeBB v4.3 + New Features

how to map a enter key to a QPushbutton

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 2 Posters 1.7k Views
  • 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.
  • ManiRonM Offline
    ManiRonM Offline
    ManiRon
    wrote on last edited by
    #1

    i am making an user login and after entering the password the user presses enter it should be mapped to QPushbutton . How to do It.

    jsulmJ 1 Reply Last reply
    0
    • ManiRonM ManiRon

      i am making an user login and after entering the password the user presses enter it should be mapped to QPushbutton . How to do It.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @ManiRon https://doc.qt.io/qt-5/qpushbutton.html#default-prop

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      ManiRonM 1 Reply Last reply
      0
      • jsulmJ jsulm

        @ManiRon https://doc.qt.io/qt-5/qpushbutton.html#default-prop

        ManiRonM Offline
        ManiRonM Offline
        ManiRon
        wrote on last edited by
        #3

        @jsulm I have enabled the auto default and default but it work when i make the tab focus to focus on that button . Button i want something like when i open the widget and enter user name and password and without focussing on the button and if i press enter it should proceed or it should work

        jsulmJ 1 Reply Last reply
        0
        • ManiRonM ManiRon

          @jsulm I have enabled the auto default and default but it work when i make the tab focus to focus on that button . Button i want something like when i open the widget and enter user name and password and without focussing on the button and if i press enter it should proceed or it should work

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @ManiRon What widget do you use for password? If it is QLineEdit then there is https://doc.qt.io/qt-5/qlineedit.html#returnPressed

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          ManiRonM 2 Replies Last reply
          2
          • jsulmJ jsulm

            @ManiRon What widget do you use for password? If it is QLineEdit then there is https://doc.qt.io/qt-5/qlineedit.html#returnPressed

            ManiRonM Offline
            ManiRonM Offline
            ManiRon
            wrote on last edited by
            #5

            @jsulm Thanks sir it worked

            1 Reply Last reply
            0
            • jsulmJ jsulm

              @ManiRon What widget do you use for password? If it is QLineEdit then there is https://doc.qt.io/qt-5/qlineedit.html#returnPressed

              ManiRonM Offline
              ManiRonM Offline
              ManiRon
              wrote on last edited by Christian Ehrlicher
              #6
              This post is deleted!
              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