Results 1 to 4 of 4

Thread: save line edit text to tabel widget row

  1. #1
    Join Date
    Aug 2013
    Location
    Bangalore
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default save line edit text to tabel widget row

    i had taken two different forms in qtcreater in one form i had taken tablewidget in another form i had taken line edit and push button in same form when i click on pushbutton the lineedit text should save in table widget row.send me sample code.

  2. #2
    Join Date
    Nov 2012
    Posts
    232
    Thanks
    118
    Thanked 18 Times in 10 Posts
    Platforms
    Windows Android

    Default Re: save line edit text to tabel widget row

    Use QTableView instead QTableWidget. It is very convenient. http://qt-project.org/doc/qt-4.8/modelview.html

  3. #3
    Join Date
    Feb 2013
    Location
    India
    Posts
    153
    Thanks
    27
    Thanked 18 Times in 18 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: save line edit text to tabel widget row

    Have you tried it once?
    sample code will not solve your problem if you have not tried it yet.

    You have to send SIGNALS from one window to other.
    Implement a SLOT which will execute when SIGNAL emit, and add a new row in QTableWidget.
    Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.

  4. #4
    Join Date
    Nov 2012
    Posts
    232
    Thanks
    118
    Thanked 18 Times in 10 Posts
    Platforms
    Windows Android

    Default Re: save line edit text to tabel widget row

    I wrote the example for you.

    52.png
    Attached Files Attached Files

Similar Threads

  1. QTableView line edit clears the text on edit
    By PlasticJesus in forum Qt Programming
    Replies: 5
    Last Post: 14th March 2015, 19:06
  2. Text/line edit in QWebView
    By Esperto in forum Qt Programming
    Replies: 1
    Last Post: 15th December 2011, 09:41
  3. Problem>QT and Mini2440: Get text from Line edit
    By mrquicuong in forum Newbie
    Replies: 1
    Last Post: 26th November 2011, 13:26
  4. Replies: 3
    Last Post: 26th August 2010, 08:57
  5. Replies: 8
    Last Post: 15th May 2007, 09:21

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.