Results 1 to 2 of 2

Thread: Qtable--setText problem

  1. #1
    Join Date
    Feb 2006
    Posts
    51
    Thanks
    7

    Default Qtable--setText problem

    hi every one..

    i have a table which present the data from a list .. the first list of data is printed well but i have more list which i want to present just after the first list in the same table.. it doesnt work

    here is my code :

    Qt Code:
    1. QStringList testInstIDs = testIF->getTestInstanceIdList();
    2. for ( int j = 0; j < testInstIDs.count(); j++)
    3. {
    4.  
    5. int numRows = m_teststatisticsTable->numRows();
    6. int countRows = testInstIDs.count()*10;
    7. m_teststatisticsTable->setNumRows(countRows);
    8.  
    9. m_teststatisticsTable->setText(numRows++,0,testInstIDs[j]);
    10.  
    11.  
    12. QStringList summary_list = app->evaluateTestDataAndGetSummary(testInstIDs[j]);
    13. for ( int i = 0; i < summary_list.count(); i++ )
    14. {
    15.  
    16. int summary_listCount = summary_list.count()*10;
    17. m_teststatisticsTable->setColumnStretchable(1,true);
    18. m_teststatisticsTable->setText(numRows,1,summary_list[summary_listCount]);
    19. m_teststatisticsTable->setText(numRows+i,1,summary_list[summary_listCount+i]);
    20. m_teststatisticsTable->setText(numRows+i,1,summary_list[summary_listCount+i]);
    21. m_teststatisticsTable->setText(numRows+i,1,summary_list[summary_listCount+i]);
    22. m_teststatisticsTable->setText(numRows+i,1,summary_list[summary_listCount+i]);
    23. m_teststatisticsTable->setText(numRows+i,1,summary_list[summary_listCount+i]);
    24. m_teststatisticsTable->setText(numRows+i,1,summary_list[summary_listCount+i]);
    25. m_teststatisticsTable->setText(numRows+i,1,summary_list[summary_listCount+i]);
    26. m_teststatisticsTable->setText(numRows+i,1,summary_list[summary_listCount+i]);
    27.  
    28. }
    To copy to clipboard, switch view to plain text mode 

    can anyone plz help what i am doing wrong??
    Love::Peace

  2. #2
    Join Date
    Feb 2006
    Posts
    51
    Thanks
    7

    Default Re: Qtable--setText problem

    hi guys,

    i have solved it i should have just chnage this

    Qt Code:
    1. int countRows = testInstIDs.count()*10;
    To copy to clipboard, switch view to plain text mode 

    to this:

    Qt Code:
    1. int countRows = numRows+10;
    To copy to clipboard, switch view to plain text mode 
    Love::Peace

Similar Threads

  1. QTimer problem ... it runs but never triggs
    By yellowmat in forum Newbie
    Replies: 4
    Last Post: 4th July 2006, 12:54
  2. QTable resize problem with large tables
    By Robzzz in forum Newbie
    Replies: 3
    Last Post: 22nd May 2006, 14:13
  3. Grid Layout Problem
    By Seema Rao in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2006, 12:45
  4. Replies: 16
    Last Post: 7th March 2006, 15:57
  5. Problem with QTable
    By zlatko in forum Qt Programming
    Replies: 1
    Last Post: 16th February 2006, 10:00

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.