Results 1 to 10 of 10

Thread: Source code for createIndex() ?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #7
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,332
    Qt products
    Qt5
    Platforms
    Windows
    Thanks
    317
    Thanked 871 Times in 858 Posts

    Default Re: Source code for createIndex() ?

    The third parameter is also defined as a void * pointer, which in reality means it can contain anything that will fit into the size of a pointer (usually the same size as an unsigned long). In Python, you could possibly use this to store the index into a list of objects, for example. The implementation of PySide might even coerce a Python object reference into a pointer "under the hood" so you may be able to store a Python object reference in it.

    But as anda_skoa says, it is rare that you need to use this third parameter unless you are implementing a tree or a proxy model where it would be difficult to navigate the model otherwise.

  2. The following user says thank you to d_stranz for this useful post:

    neuronet (30th December 2014)

Similar Threads

  1. Source code to *.ui
    By Zergi in forum Qt Tools
    Replies: 3
    Last Post: 28th September 2011, 18:12
  2. no source code
    By banlinhtienphong in forum General Programming
    Replies: 1
    Last Post: 25th July 2011, 17:19
  3. Source code
    By afflictedd2 in forum Qt Programming
    Replies: 3
    Last Post: 4th November 2008, 09:04
  4. source code
    By Colx007 in forum Newbie
    Replies: 5
    Last Post: 19th December 2007, 09:15
  5. Qte source code
    By Gaurav vyas in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 1st July 2007, 14:11

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
  •  
Qt is a trademark of The Qt Company.