Results 1 to 4 of 4

Thread: copy() slot doesn't work

  1. #1
    Join Date
    Jan 2009
    Posts
    51
    Thanks
    28
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default copy() slot doesn't work

    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!

  2. #2
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    517
    Thanks
    21
    Thanked 66 Times in 62 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: copy() slot doesn't work

    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?

  3. The following user says thank you to talk2amulya for this useful post:

    Macok (14th February 2009)

  4. #3
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: copy() slot doesn't work

    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?

    Lykurg


    EDIT: Damn, too late...

  5. The following user says thank you to Lykurg for this useful post:

    Macok (14th February 2009)

  6. #4
    Join Date
    Jan 2009
    Posts
    51
    Thanks
    28
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: copy() slot doesn't work

    Oh, I forgot about selecting it first, thanks!

Similar Threads

  1. How to declare SLOT as a parameter to member function?
    By QPlace in forum Qt Programming
    Replies: 2
    Last Post: 17th July 2018, 00:41
  2. Replies: 1
    Last Post: 27th November 2014, 09:11
  3. Problem When Creating my own Slot
    By Fatla in forum Qt Programming
    Replies: 12
    Last Post: 6th June 2008, 14:44
  4. Copy / Paste doesn't work with LineEdit
    By ia32 in forum Qt Tools
    Replies: 2
    Last Post: 5th May 2008, 21:44

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.