Results 1 to 4 of 4

Thread: again problem in add items in tablewidget

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: again problem in add items in tablewidget

    Invoke QTableWidget::setRowCount() OR QTableWidget::insertRow(), not both. Variable
    "int RowCount" is initialized as zero and never changed.
    Qt Code:
    1. int row=tableWidget->rowCount();
    2. tableWidget->insertRow(row);
    3.  
    4. tableWidget->setItem(row,0,item);
    5.  
    6. QTableWidgetItem *item1=...
    7. tableWidget->setItem(row,1,item1);
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

  2. The following user says thank you to jpn for this useful post:

    jyoti (24th November 2006)

Similar Threads

  1. Replies: 2
    Last Post: 23rd November 2006, 11:33
  2. QGraphicsItem problem - how to save items info ??
    By aamer4yu in forum Qt Programming
    Replies: 3
    Last Post: 17th October 2006, 12:17
  3. Selection problem in QTreeView
    By Valheru in forum Qt Programming
    Replies: 3
    Last Post: 7th October 2006, 16:02
  4. Selective highlighting of Items
    By Kapil in forum Qt Programming
    Replies: 3
    Last Post: 26th May 2006, 12:20
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

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.