DONE: Signal called more than once

Please report bugs.

DONE: Signal called more than once

Postby Slowdown » Sun May 06, 2012 7:06 am

Code: Select all
' this is the mainwindow scope

Outlet lineEdit As QLineEdit

Event Init()
  SetFocus(lineEdit)
End Event

Signal on_lineEdit_editingFinished()
  Print "This Signal is called twice !! " & "\n"
  Print "and is also called if the form is closed by the close button" & "\n"
End Signal

Will result that the Signal is called twice when editing is finished.
And it's called again when the form is closed by the close button.
Kind regards,
Slowdown

OSX 10.8.x, VBox Xp, Ubuntu 32/64 bit, EOS 64 bit
Slowdown
 
Posts: 465
Joined: Sat May 01, 2010 7:11 pm
Location: Netherlands

Re: Signal called more than once

Postby berndnoetscher » Mon May 07, 2012 7:40 am

Hi Joost

thanks though this is the correct behaviour.

Qt says
"
This signal is emitted when the Return or Enter key is pressed or the line edit loses focus.
"

and that is exactly what it does.

When Print is used it looses focus-> 2nd signal call
berndnoetscher
Site Admin
 
Posts: 344
Joined: Thu Mar 25, 2010 9:57 am

Re: Signal called more than once

Postby Slowdown » Mon May 07, 2012 2:33 pm

Did read the Qt manual and indeed you're right.
In my humble opinion it's not quite logical but it's how Qt does it.
find out that,
Code: Select all
Signal on_lineEdit_returnPressed()
  Print "done editing"
End Signal

Also can be used.
Kind regards,
Slowdown

OSX 10.8.x, VBox Xp, Ubuntu 32/64 bit, EOS 64 bit
Slowdown
 
Posts: 465
Joined: Sat May 01, 2010 7:11 pm
Location: Netherlands


Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 1 guest

cron