Results 1 to 4 of 4

Thread: how to merge two adjacent grids of a QTableWidget into one?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2007
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    1

    Smile Re: how to merge two adjacent grids of a QTableWidget into one?

    I'm sorry, Maybe I did not make that clear.
    Now , let's do some explaining.
    I'm doing a cluster monitoring software whose gui uses Qt(now I use Qt 4.2), I want to use QTableWidget to express some kind of information of every node in cluster, for example, I want to use a row to express a node's nodeName, each cpu's efficiency, active state. Now the problem comes, a computer node may have several cpus( eg. two cpus) , but only has one active state( active or inactive), diagram as following:
    ___________________
    |Node1 | 90% | ON |
    | |-----------| |
    | | 50 % | |
    ----------------------------------
    what can I do use QTableWidget to implement the above thing ?

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: how to merge two adjacent grids of a QTableWidget into one?

    Ahh, so you want to merge cells, not whole tables. Try making use of QTableView::setSpan(). I'm not sure if I ever tried it with Qt 4.2 but at least with Qt 4.3.0 it seems to work pretty nicely.
    J-P Nurmi

  3. The following user says thank you to jpn for this useful post:

    bookmarkernj (8th July 2007)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.