Results 1 to 3 of 3

Thread: Is third input to createIndex really a pointer?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2012
    Posts
    132
    Thanks
    10
    Thanked 21 Times in 21 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Is third input to createIndex really a pointer?

    The internal pointer is used by the model to associate the index with the internal data structure (from the docs).

    It seems like you're doing something like the Simple Tree Model Example: http://qt-project.org/doc/qt-4.8/ite...treemodel.html
    Here the internal pointer points to a TreeItem instance which holds data for the index and also a pointer to the parent of the index (which points to another TreeItem instance of course). This pointer is used as internal pointer when creating the parent index.

    Given that I am working in Python, which does not use pointers
    Correct, in Python you don't use pointers (all values are references). Maybe it would make more sense to talk about "internal objects" here.

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

    neuronet (15th July 2014)

  3. #2
    Join Date
    Jun 2014
    Posts
    98
    Thanks
    43
    Thanked 4 Times in 4 Posts
    Platforms
    Windows

    Default Re: Is third input to createIndex really a pointer?

    Maybe this is a case where translation of documentation to Python hasn't been as smooth because we don't use pointers

    (Note I just added to original post: I x-posted this to stack overflow)

Similar Threads

  1. Replies: 20
    Last Post: 1st July 2015, 01:19
  2. Replies: 0
    Last Post: 5th December 2013, 06:46
  3. Replies: 0
    Last Post: 28th December 2012, 06:49
  4. Replies: 3
    Last Post: 21st June 2011, 06:25
  5. Replies: 1
    Last Post: 4th December 2010, 17:20

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.