Results 1 to 4 of 4

Thread: Inserting a Custom Widget inside a QTableView Cell

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2012
    Location
    India
    Posts
    51
    Thanks
    4
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: Inserting a Custom Widget inside a QTableView Cell

    but through QItemDelegate we can only display the widget during editing the cell..
    Is there any way to display it permanently ?

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Inserting a Custom Widget inside a QTableView Cell

    Well, you can use QAbstractItemView::openPersistentEditor, but it can "slow down" your view if there are a lot of data.
    I would suggest to grab an editor using QPixmap::grabWidget or even better to render it using QWidget::render in the item's delegate QItemDelegate::paint method.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

Similar Threads

  1. Replies: 1
    Last Post: 7th September 2011, 18:04
  2. Custom widget won't size properly in a table cell
    By zeroknowledge in forum Qt Programming
    Replies: 1
    Last Post: 11th May 2011, 16:32
  3. Inserting label inside textEdit widget
    By dshan in forum Qt Programming
    Replies: 1
    Last Post: 11th January 2011, 11:17
  4. inserting custom Widget to listview
    By Amit_3117 in forum Qt Programming
    Replies: 20
    Last Post: 27th August 2010, 17:38
  5. How to show custom widget in TreeView's cell :-/
    By WolfMM in forum Qt Programming
    Replies: 2
    Last Post: 7th July 2007, 11:16

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.