Results 1 to 20 of 24

Thread: qt4 QStringList with model/view

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #9
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: qt4 QStringList with model/view

    Quote Originally Posted by incapacitant
    There is a pre-defined type for all QList ?
    Here we have QList<QStrings>.
    Would it be still the same QModelIndexList ?
    with QList<Int>, or another type ?
    Actually, QStringList and QList<QString> are different. QStringList inherits QList<QString> and adds some functionality..

    Because QList is a template class, you can have a list of basically anything, as long as it is an assignable data type.

    There are a few type definitions: QVariantList, QObjectList, QModelIndexList..
    You can take them as a more convenient way of writing the type or something..

    There is an essential reason for these type definitions, and I think it has something to do with Qt's meta-object system, only registered meta types can be used in signal and slot connections..
    But that's a whole different world to discuss

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

    incapacitant (15th March 2006)

Similar Threads

  1. QStringList
    By jaca in forum Qt Programming
    Replies: 5
    Last Post: 17th May 2008, 10:12
  2. QStringList scope problem
    By ht1 in forum Qt Programming
    Replies: 5
    Last Post: 30th November 2007, 19:44
  3. QStringList in QObject::connect
    By DPinLV in forum Qt Programming
    Replies: 6
    Last Post: 6th September 2006, 17:01
  4. Cannot queue arguments of type 'QStringList'
    By vfernandez in forum Qt Programming
    Replies: 2
    Last Post: 19th April 2006, 20:48
  5. need help to classify some QStringList
    By patcito in forum Qt Programming
    Replies: 3
    Last Post: 17th February 2006, 21:24

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.