Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Using QList and QTableWidgetItem
Forum Updated to NodeBB v4.3 + New Features

Using QList and QTableWidgetItem

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 635 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    topocc
    wrote on last edited by
    #1

    I'm using QTableWidgetItem, but QList,.

    @
    QTableWidgetItem *textoItem;
    QList <QTableWidgetItem> *listaItemsBase;
    textoItem = new QTableWidgetItem;
    listaItemsBase = new QList <QTableWidgetItem>;

    for(int x = 0;x<10;x++)
    {
        textoItem->setText(QString::number(x));
        //qDebug() << "item: " << x << ": " << listaItemsBase->at(2);
        listaItemsBase->append(*textoItem);
    }
    
    
    for(int xy = 0;xy<listaItemsBase->size();xy++)
    {
        ui->tableWidget->setCellWidget(xy,0,listaItemsBase->at(xy));
    }
    

    @

    [edit: corrected coding tags @ SGaist]

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved