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. Is there a real difference ?
Forum Updated to NodeBB v4.3 + New Features

Is there a real difference ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 342 Views 3 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.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by
    #1

    Both slots run when "enter" is pressed on empty lineEdit widget, as they should according to the document.
    I am curious if somebody can come up with a reason for using one or the other.

    No, I do not have an issue or problem with it.

    void Form_SYSTEM::on_lineEdit_70_editingFinished()
    {
         qDebug() << ("on_lineEdit_70_editingFinished()"); // << currentText;
    }
    
    
    void Form_SYSTEM::on_lineEdit_70_returnPressed()
    {
        qDebug() << ("on_lineEdit_70_returnPressed()"); // << currentText;
    }
    
    
    
    Pl45m4P 1 Reply Last reply
    0
    • M Offline
      M Offline
      mpergand
      wrote on last edited by mpergand
      #2

      Looking at the docs, the only difference I see :

      editingFinished()
      This signal is emitted when the Return or Enter key is pressed or the line edit loses focus

      Logically this implies that returnPressed is not emitted on focus lost.
      Not tested :)

      1 Reply Last reply
      1
      • A Anonymous_Banned275

        Both slots run when "enter" is pressed on empty lineEdit widget, as they should according to the document.
        I am curious if somebody can come up with a reason for using one or the other.

        No, I do not have an issue or problem with it.

        void Form_SYSTEM::on_lineEdit_70_editingFinished()
        {
             qDebug() << ("on_lineEdit_70_editingFinished()"); // << currentText;
        }
        
        
        void Form_SYSTEM::on_lineEdit_70_returnPressed()
        {
            qDebug() << ("on_lineEdit_70_returnPressed()"); // << currentText;
        }
        
        
        
        Pl45m4P Offline
        Pl45m4P Offline
        Pl45m4
        wrote on last edited by
        #3

        @AnneRanch

        If you press any key except Return returnPressed is not emitted, but editingFinished is, when you stop entering input to your lineEdit.


        If debugging is the process of removing software bugs, then programming must be the process of putting them in.

        ~E. W. Dijkstra

        A 1 Reply Last reply
        1
        • Pl45m4P Pl45m4

          @AnneRanch

          If you press any key except Return returnPressed is not emitted, but editingFinished is, when you stop entering input to your lineEdit.

          A Offline
          A Offline
          Anonymous_Banned275
          wrote on last edited by
          #4

          @Pl45m4 How is it detested ? Perhaps "loosing focus " ? Easy to tets in my app - will do it.

          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