Results 1 to 4 of 4

Thread: QTableWidgetItem

  1. #1
    Join Date
    Mar 2009
    Location
    Gansu,China
    Posts
    188
    Qt products
    Qt4
    Platforms
    Windows

    Default QTableWidgetItem

    Hi,every one.
    I want to draw some pictures with QPainterPath and put them on QTableWidgetItem,I do not know how to realize it?
    Thk u.

  2. #2
    Join Date
    Jul 2011
    Posts
    26
    Thanks
    11
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QTableWidgetItem

    Hmmm ... draw in a widget... and set the widget to the QTableWidget with
    Qt Code:
    1. void setCellWidget ( int row, int column, QWidget * widget )
    To copy to clipboard, switch view to plain text mode 

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

    Default Re: QTableWidgetItem

    Or more sophisticated: Subclass QWidgetItem and reimp its paint method.

  4. #4
    Join Date
    Mar 2009
    Location
    Gansu,China
    Posts
    188
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QTableWidgetItem

    Thk u for your answer.
    When I drag the UI with mouse and resize it, I find that the intervals of columns and the rows of QTableWidget do not change,
    I want to let them change also,how to realize it?
    Last edited by weixj2003ld; 7th August 2011 at 09:01. Reason: sorry

Similar Threads

  1. QTableWidgetItem for a QTableWidget
    By Archa4 in forum Newbie
    Replies: 1
    Last Post: 28th April 2011, 12:11
  2. QTableWidget or QTableWidgetItem CSS
    By ajayajgdeva in forum Newbie
    Replies: 0
    Last Post: 5th February 2010, 14:47
  3. integer as a QTableWidgetItem ?
    By tommy in forum Qt Programming
    Replies: 7
    Last Post: 29th May 2009, 18:44
  4. help on QList<QTableWidgetItem*>
    By roncriss in forum Newbie
    Replies: 2
    Last Post: 24th November 2008, 10:19
  5. Tooltips in QTableWidgetItem
    By Arthur in forum Newbie
    Replies: 2
    Last Post: 26th January 2006, 16:47

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.