View Full Version : copy() slot doesn't work

14th February 2009, 10:25
I have lineEdit and pushButton on my form.
In designer I created connection between this button and lineEdit, it looks like this:
pushButton[clicked()] -----------------------------> lineEdit[copy()]
But when I click on button nothing happens, there's no text in my clipboard.
I'm using Qt Creator candidate release.
Thanks a lot!

14th February 2009, 10:41
for copy() to work, echo mode for lineedit should be Normal and there should be a selected text in the lineedit..are both those requirements met in ur case?

14th February 2009, 10:44
From the docs QLineEdit::copy()

Copies the selected text to the clipboard, if there is any, and if echoMode() is Normal.

Did you mention that?


EDIT: Damn, too late... :D

14th February 2009, 10:55
Oh, I forgot about selecting it first, thanks!