Results 1 to 9 of 9

Thread: Cell contains disappears after adding delegate in QTableview

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 Cell contains disappears after adding delegate in QTableview

    I have created one table by using QTableview and QAbstractTableModel . In one of the cell i have added one help button (right corner of that cell ) using QItemdelegate .

    MyDelegate delegate;
    tableView.setItemDelegate(&delegate);

    when i am adding the delegate by using the above code ,delegate appears but the cell contains disappears .

    but when i am not using delegate the cell contains appears .I want to display both cell contains as well as the delegate in that particular cell .

    is anywhere i am doing wrong ?

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Cell contains disappears after adding delegate in QTableview

    is anywhere i am doing wrong ?
    Yes, you are expecting us to guess what your code does without having seen it. If the cell content is not being shown then it will be because your delegate code is not painting it (display mode) or placing it in the editor (edit mode).

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. Replies: 2
    Last Post: 28th October 2010, 09:26
  3. Replies: 3
    Last Post: 5th April 2010, 21:20
  4. Replies: 8
    Last Post: 23rd October 2009, 15:33
  5. QTableView, QSqlTableModel - data disappears
    By msh in forum Qt Programming
    Replies: 1
    Last Post: 15th November 2008, 11:50

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.