Results 1 to 2 of 2

Thread: Sending text from QTextEdit to QListWidget on pushing QPushButton - Qt

  1. #1
    Join Date
    Apr 2011
    Posts
    231
    Thanks
    141
    Thanked 6 Times in 5 Posts

    Default Sending text from QTextEdit to QListWidget on pushing QPushButton - Qt

    So, I have the following design:

    List box
    Text box
    Push button


    When I push the button, the text from the text box should go to the list box.

    QTextEdit has the following signal:
    Qt Code:
    1. void QTextEdit::textChanged () [signal]
    To copy to clipboard, switch view to plain text mode 

    But, doesn't this mean that when user presses an alphabet, a signal will be sent? But, I want the whole paragraph to go to the list box (at once) on the push of the button.

    Should I send the data from text box to button and then from button to list box? Or there another way out?

  2. #2
    Join Date
    Feb 2011
    Posts
    354
    Thanks
    17
    Thanked 27 Times in 24 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default Re: Sending text from QTextEdit to QListWidget on pushing QPushButton - Qt

    Connect QPushButton's clicked signal to some slot where you read the text from text edit and add it to the QListWidget, QListView whatever.

Similar Threads

  1. Sending signals from QPushButton
    By iosif18 in forum Qt Quick
    Replies: 0
    Last Post: 15th September 2011, 11:23
  2. Sending signals from QPushButton
    By Cucus in forum Newbie
    Replies: 3
    Last Post: 19th July 2011, 04:06
  3. QTableView, QTextEdit and QPushButton
    By hml in forum Newbie
    Replies: 0
    Last Post: 5th March 2010, 14:22
  4. sending Text or binary file over network
    By Tavit in forum Qt Programming
    Replies: 1
    Last Post: 21st March 2008, 00:42
  5. QTextEdit + paste rich text as plain text only
    By Yong in forum Qt Programming
    Replies: 2
    Last Post: 6th February 2008, 16:45

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.