Results 1 to 4 of 4

Thread: Add QPushButton to cell in QTableView?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Jun 2010
    Posts
    86
    Thanks
    10
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Add QPushButton to cell in QTableView?

    If you aren't forced to use QTableView, you can use QTableWidget, it's straightforward
    Qt Code:
    1. //use this to add any widget to any cell in the table:
    2. QTableWidget::setCellWidget();
    3. // and this to get a pointer to this added widget:
    4. QTableWidget::cellWidget()
    To copy to clipboard, switch view to plain text mode 

  2. The following 2 users say thank you to ahmdsd_ostora for this useful post:

    nikhil (13th July 2010), ShaChris23 (1st September 2010)

Similar Threads

  1. how to color a cell in a QTableView
    By JeanC in forum Qt Programming
    Replies: 13
    Last Post: 9th September 2015, 10:08
  2. How to tell if QTableView cell is visible ?
    By steviekm3 in forum Qt Programming
    Replies: 0
    Last Post: 2nd March 2009, 10:04
  3. How to tell if cell in QTableView is visible ??
    By steviekm3 in forum Qt Programming
    Replies: 3
    Last Post: 27th February 2009, 17:57
  4. how to get data from cell of QTableview
    By yleesun in forum Qt Programming
    Replies: 2
    Last Post: 9th January 2009, 14:31
  5. How to select a cell in a QTableView
    By JeanC in forum Qt Programming
    Replies: 6
    Last Post: 6th February 2008, 13:20

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.