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. setSpan Qt5
Forum Updated to NodeBB v4.3 + New Features

setSpan Qt5

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 359 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.
  • B Offline
    B Offline
    Brunirio
    wrote on last edited by Brunirio
    #1

    Hello, got a little confused with QTableWidget. Need help

    Qt3: QTableItem*item = table->item(table->numRows()-2,0);
    item->setSpan(item->rowSpan()+1,1);

    Qt5: int row = table->rowCount()-2;
    table->setSpan(row, 0, rowSpan(row, 0)+1, 1);

    Got the message: qtableview::setspan span cannot overlap
    So I went for this types of essay to find a proper solution.

    Did it other way:

    QTableWidgetItem*item = table->item(table->rowCount()-2,0);
    table->setSpan(item->row(), item->column(),
    table->rowSpan(item->row(), item->column())+1,
    table->columnSpan(item->row(), item->column()));

    Error - value()->column() -1

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Can you explain (maybe show with an image) the result you want to achieve ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      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