Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QTableWidget cell text not change
Qt 6.12 LTS is out! See what's new in the release blog

QTableWidget cell text not change

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 670 Views
  • 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.
  • L Offline
    L Offline
    LCorona
    wrote on last edited by
    #1

    For progam logic is necesarry change the text of a multiple cells in a QTableWidget during the program is running, the instruction:

    ui->channelsTable->item(0,0)->setText("change Text");
    

    Does not anything.

    Initially the cells full with a initial text.

    ui->channelsTable->setItem(0,0, new QTableWidgetItem("0"));
    

    The text not change and remains in "0".

    How to do this?

    L 1 Reply Last reply
    0
    • L LCorona

      For progam logic is necesarry change the text of a multiple cells in a QTableWidget during the program is running, the instruction:

      ui->channelsTable->item(0,0)->setText("change Text");
      

      Does not anything.

      Initially the cells full with a initial text.

      ui->channelsTable->setItem(0,0, new QTableWidgetItem("0"));
      

      The text not change and remains in "0".

      How to do this?

      L Offline
      L Offline
      LCorona
      wrote on last edited by
      #2

      @LCorona
      My Bad, was a problem with other code. The instruction works fine.

      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
      • Unsolved