Results 1 to 5 of 5

Thread: QTableWidget::itemFromIndex is protected, why? and a workaround?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2010
    Location
    Germany
    Posts
    54
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    1

    Default QTableWidget::itemFromIndex is protected, why? and a workaround?

    I'm writing a delegate to do drawing for cells in a table. The delegate is provided the QModelIndex item and I would like to retrieve the QTableWidgetItem that is associated with it. The problem is that the itemFromIndex member of QTableWidget is protected.

    In one case I have a derived table, but in my generic case I use just the standard QTableWidget. Without deriving the class is there another way to get at the QTableWidgetItem from the QModelIndex?

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Wiki edits
    5

    Default Re: QTableWidget::itemFromIndex is protected, why? and a workaround?

    what's about using QTableWidget::item()?

Similar Threads

  1. Replies: 9
    Last Post: 12th February 2011, 18:05
  2. workaround for messagebox modality bug
    By mortoray in forum Qt Programming
    Replies: 1
    Last Post: 17th October 2010, 11:07
  3. Workaround for a Qt ui bug
    By eurodatar in forum Qt Programming
    Replies: 2
    Last Post: 8th July 2010, 16:12
  4. Workaround for StandardItemModel drag drop bug
    By onamatic in forum Qt Programming
    Replies: 4
    Last Post: 9th November 2008, 21:50
  5. QWidget::setMask: bug &/or help for workaround
    By ataffard in forum Qt Programming
    Replies: 3
    Last Post: 23rd May 2008, 07:34

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.