Hello everyone ........
I have a problem that I wana remove selected row from Q3Table but whenever i remove it , there remains one selected row.............
I don't know what mistake I m doing ????
My code is as following ......
void dlgCreateplaylist::pbRemove_clicked()
{
int flag=0;
numberFrame1=0,numberFrame2=0,numberFrame3=0;
pbSelectall2->setText("Select All");
int checked[25],index=0;
/******************************************************
*check the row number in table2 is checked or unhecked and remove*********
******************************************************/
Q3CheckTableItem *pb1 = new Q3CheckTableItem(Table2, " ");
for(int r=0;r<Table2->numRows();r++)
{
pb1=(Q3CheckTableItem *) Table2->item(r,0);
if(pb1->isChecked())
{
checked[index++]=r;
Table2->removeRow(r);
qDebug()<<"value of Index"<<index;
r=r-1;
flag=1;
flags=0;
}
}
if(flag==0)
{
QMessageBox::information( this,
"Createplaylist",
"Select the Media item to Deleted.");
}
void dlgCreateplaylist::pbRemove_clicked()
{
int flag=0;
numberFrame1=0,numberFrame2=0,numberFrame3=0;
pbSelectall2->setText("Select All");
int checked[25],index=0;
/******************************************************
*check the row number in table2 is checked or unhecked and remove*********
******************************************************/
Q3CheckTableItem *pb1 = new Q3CheckTableItem(Table2, " ");
for(int r=0;r<Table2->numRows();r++)
{
pb1=(Q3CheckTableItem *) Table2->item(r,0);
if(pb1->isChecked())
{
checked[index++]=r;
Table2->removeRow(r);
qDebug()<<"value of Index"<<index;
r=r-1;
flag=1;
flags=0;
}
}
if(flag==0)
{
QMessageBox::information( this, "Createplaylist","Select the Media item to Deleted.");
}
To copy to clipboard, switch view to plain text mode
Please if anyone can do something I'll apperciate his reply........Thanx in advance
Bookmarks