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 submit data from line edit onReturnClicked

How to submit data from line edit onReturnClicked

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 526 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.
  • RubbieKelvinR Offline
    RubbieKelvinR Offline
    RubbieKelvin
    wrote on last edited by
    #1

    hi guys... m working on my first Qt based desktop application. m having problems submitting a form when return is cliked. Please help out with the code for it.

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to the forums.
      Please show the code you currently have and what "submit" would mean in your context?

      1 Reply Last reply
      1
      • RubbieKelvinR Offline
        RubbieKelvinR Offline
        RubbieKelvin
        wrote on last edited by
        #3

        i am currently using the qt designer i have this ui with a line edit,.. and i wanna collect the text in it when return is clicked.. :)0_1553373502596_Capture.PNG

        1 Reply Last reply
        0
        • mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi
          Are you using python ? or is there other reason that you use the
          standalone UI designer and not the one in Creator ?
          Anyway, all Widgets are handled via signals and slots.
          https://doc.qt.io/qt-5/signalsandslots.html
          So you could connect the QLineEdits
          https://doc.qt.io/qt-5/qlineedit.html#returnPressed
          to your slot to grab the text if user press the enter key and/or you would connect to the
          buttons clicked()
          https://doc.qt.io/qt-5/qabstractbutton.html#clicked

          1 Reply Last reply
          1

          • Login

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