Nazgul
28th April 2011, 18:12
Hello,
What I'm trying to do is having a small icon in front of a row in a QTableWidget. This is the code I've so far:
QTableWidgetItem * test = new QTableWidgetItem("00400000");
test->setBackground(QBrush(Qt::green));
QIcon qilel(":/Resources/red_arrow.png");
test->setIcon(qilel);
ui.SendList->setItem(0,1,test);
the qilel value of QIcon, is my code + resource map and then the red_arrow is the png I would like to add. The prolbme is that I don't see any Icon
Further when I use verticalHeader()->hide(); for the table will this still work, if I get this to work anyways.
Thanks,
What I'm trying to do is having a small icon in front of a row in a QTableWidget. This is the code I've so far:
QTableWidgetItem * test = new QTableWidgetItem("00400000");
test->setBackground(QBrush(Qt::green));
QIcon qilel(":/Resources/red_arrow.png");
test->setIcon(qilel);
ui.SendList->setItem(0,1,test);
the qilel value of QIcon, is my code + resource map and then the red_arrow is the png I would like to add. The prolbme is that I don't see any Icon
Further when I use verticalHeader()->hide(); for the table will this still work, if I get this to work anyways.
Thanks,