Results 1 to 2 of 2

Thread: how to access QCheckTableItem data with in a QTable.

  1. #1
    Join Date
    Aug 2007
    Location
    Gorakhpur, India
    Posts
    254
    Thanks
    8
    Thanked 14 Times in 14 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Question how to access QCheckTableItem data with in a QTable.

    Dear Everyone!
    I have putted a QTable at design time & putted file in zeroth column using with QCheckTableItem.
    How to access QCheckTableItem when it is checked using setCheced()?
    What is the syntax in this case to put this data into Table2.
    void dlgCreateplayist::init()
    {

    int row=0; //row no.
    int i=0;
    int x=1; //seqence no.

    QString string;
    QDir dirp("/root/");
    QStringList list=dirp.entryList("*.h;*.c;*.cpp");

    for(QStringList::Iterator it=list.begin();it!=list.end();++it)

    {
    Table1->insertRows(row);
    Table1->setColumnWidth(0,150);
    Table1->setColumnWidth(1,35);

    Table1->setRowLabels(" ");

    Table1->setText(row,1,QString::number(x));

    Table1->setText(row,2,*it);

    QString data(*it);
    QString s = data.section(".",1,1);

    Table1->setText(row,3,s);

    string = "/root/";

    b[i] =string.append( *it);

    Table1->setText(row,4,b[i]);


    QString num=QString::number(row);


    Table1->setItem(row,0,new QCheckTableItem(Table1,*it));

    a[i] = *it;

    i++;
    row++;
    x++;

    }
    p= Table1->numRows();

    }

    Thanks in advance!
    regards!
    Anurag Shukla
    A man who never makes mistake is the man who never does anything! Theodre Rosvelt!

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

    Default Re: how to access QCheckTableItem data with in a QTable.

    J-P Nurmi

Similar Threads

  1. Displaying data in QTable
    By raghvendramisra in forum Qt Tools
    Replies: 1
    Last Post: 6th September 2007, 12:48
  2. QTable - Data Base Problem
    By esq in forum Qt Tools
    Replies: 9
    Last Post: 27th May 2007, 23:08
  3. IO Control Mechanism (Hardware Data Access)
    By rud_1023 in forum General Programming
    Replies: 2
    Last Post: 23rd October 2006, 12:50
  4. speed of setdata - lots of items in treeview
    By Big Duck in forum Qt Programming
    Replies: 4
    Last Post: 6th July 2006, 12:53

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.