Results 1 to 3 of 3

Thread: QTableWidgetItem dynamic type, how?!

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2010
    Posts
    23
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QTableWidgetItem dynamic type, how?!

    Hi all, I wanted to implement something similar to how for example properties editor works in Designer.
    Initially all values seem to reside in simple Qtablewidgetitems (or treeitems, does not matter), but when I activate some cell it turns into combobox or anything else. How is it coded? Help me please!

  2. #2
    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 dynamic type, how?!

    They use delegates. Just have a look in the code. It's open source... Also have a look at Qt Solutions, I think they have an example as well.

  3. #3
    Join Date
    May 2010
    Posts
    23
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QTableWidgetItem dynamic type, how?!

    Thank you. Qt solutions provide exactly the class that I needed. BTW I tried to get it from the Designer source, it is not that easy.

Similar Threads

  1. Replies: 7
    Last Post: 19th April 2011, 12:20
  2. Replies: 2
    Last Post: 22nd December 2009, 20:52
  3. Dynamic pointer type
    By estanisgeyer in forum General Programming
    Replies: 3
    Last Post: 9th October 2008, 16:51
  4. QTableWidget QTableWidgetItem
    By TheKedge in forum Qt Programming
    Replies: 3
    Last Post: 6th September 2006, 15:03
  5. Type and User Type
    By campana in forum Qt Programming
    Replies: 1
    Last Post: 27th February 2006, 23:22

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.