[Qt-interest] QTableWidget not showing QTableWidgetItems
Andrei Sebastian Cimpean
andreiamenta at gmail.com
Thu Sep 24 12:07:31 CEST 2009
Hello everybody!
I have this code that i put together using tutorials from Qt. I send a
QStringList as parameter and in debug mode it shows correctly everything...
The this is that the result i get is something like this:
http://img22.imageshack.us/content.php?page=done&l=img22/4738/snapshot3tf.png
Can anyone help me? Thanks
QGroupBox *configGroup = new QGroupBox(tr("Files selected for renaming"));
QTableWidget *filesTable = new QTableWidget();
filesTable->setRowCount(1);
qDebug() << files;
for (int i = 0; i < files.size(); ++i){
QTableWidgetItem *fileNameItem = new QTableWidgetItem(files.at(i));
qDebug()<<fileNameItem->text();
fileNameItem->setFlags(Qt::ItemIsUserCheckable);
int row = filesTable->rowCount();
filesTable->insertRow(row);
filesTable->setItem(row, 0,fileNameItem);
}
QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->addWidget(filesTable);
mainLayout->addStretch(1);
setLayout(mainLayout);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090924/0598ee33/attachment.bin
More information about the Qt-interest-old
mailing list