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. Problem with QTableWidget
Qt 6.11 is out! See what's new in the release blog

Problem with QTableWidget

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 468 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    In an RVIZ plugin i use a QTableWidget to display a max of 100 waypoints. Everytime a waypoint is changed, added oder removed i trigger an updated function which fills the QTableWidget with the current waypoints. The problem which accours is that the QTableWidget is only repainted every second change.

    @
    void WaypointPanel::updateTable() {
    //fill the table with the new content
    WaypointList->setRowCount(waypointArray->getArraySize());
    for(int i=0; i<WaypointList->rowCount();i++){
    //insert content into new row
    WaypointList->setItem(i,0,new QTableWidgetItem(tmpLocale->toString(waypointArray->getWaypoint(i).x ) ,0));
    WaypointList->setItem(i,1,new QTableWidgetItem(tmpLocale->toString(waypointArray->getWaypoint(i).y ) ,0));
    WaypointList->setItem(i,2,new QTableWidgetItem(tmpLocale->toString(waypointArray->getWaypoint(i).z ) ,0));
    WaypointList->setItem(i,3,new QTableWidgetItem(tmpLocale->toString(waypointArray->getWaypoint(i).radius ) , 0));

    }
    }
    @

    If i add a loop which prints out the content of the QTableWidget i can see that the content is there but it isn't displayed.

    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