Results 1 to 3 of 3

Thread: QTableWidget update problem

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2010
    Posts
    1
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default QTableWidget update problem

    I am having trouble updating cells in QTableWidget...below is the snippet


    Qt Code:
    1. //fileds are qstringlist and they are not null//
    2. QTableWidgetItem *myitem = new QTableWidgetItem(fields[i]);
    3.  
    4. //qDebug() << "my item " << myitem->text();
    5.  
    6. // resultTable is the QTableWidget from UI form
    7. ui->resultTable->setItem(row, i, myitem);
    To copy to clipboard, switch view to plain text mode 

    The above code is in a loop to update the table. I am not sure where I am going wrong or is it a bug?
    I am on Windows Vista with Qt SDK v2010.04(Open source)
    Any help would be appreciated.
    BTW this a sample program (Trip planner from Networking section) from C++ GUI Programming with QT 4 2nd edition
    Last edited by mammenj; 13th August 2010 at 07:51.

Similar Threads

  1. QTableWidget top row won't update
    By kiss-o-matic in forum Qt Programming
    Replies: 0
    Last Post: 22nd June 2010, 02:36
  2. Unable to update QTableWidget which is on Different QWidget from MainWindow
    By sagar.mangalwedhekar in forum Qt Programming
    Replies: 1
    Last Post: 12th March 2010, 07:07
  3. update items in QTableWidget
    By darshan in forum Qt Programming
    Replies: 13
    Last Post: 3rd March 2009, 22:43
  4. why there is no update on maximize? [QTableWidget]
    By macias in forum Qt Programming
    Replies: 2
    Last Post: 7th August 2007, 15:01
  5. QTableWidget Update - slow
    By DPinLV in forum Qt Programming
    Replies: 16
    Last Post: 18th August 2006, 21:09

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
  •  
Qt is a trademark of The Qt Company.