[Qt-interest] QTableWidget not showing QTableWidgetItems
Yuvaraj R
yuvaraj at ongobiz.com
Thu Sep 24 12:18:11 CEST 2009
I am not sure, you need to set columncount()
Thanks
Yuvaraj R
On Thu, Sep 24, 2009 at 3:37 PM, Andrei Sebastian Cimpean <
andreiamenta at gmail.com> wrote:
> 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);
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090924/6b4c3d42/attachment.html
More information about the Qt-interest-old
mailing list