Results 1 to 11 of 11

Thread: Custom type registration on QVariant & toString()

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Re: Custom type registration on QVariant & toString()

    Ok, thanks for the tips. I think I have to implement it this way.
    I always thought of something like a class "QVariantListModel" and that class storing and displaying my custom type (displaying just my attribute name). Now I know why there is only a QStringListModel ;-)

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Custom type registration on QVariant & toString()

    No, there is QStandardItemModel if you really need it. QStringListModel stores simple strings and nothing more.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QVariant custom type.
    By hickscorp in forum Qt Programming
    Replies: 0
    Last Post: 3rd May 2010, 14:23
  2. Using QVariant with custom data type
    By QAlex in forum Qt Programming
    Replies: 3
    Last Post: 4th December 2009, 12:04
  3. Convert between a custom data type wrapped in a QVariant
    By darkadept in forum Qt Programming
    Replies: 2
    Last Post: 17th March 2009, 09:07
  4. QVariant custom/user type comparison
    By gri in forum Qt Programming
    Replies: 2
    Last Post: 12th August 2008, 14:36
  5. QVariant::toString and custom data types
    By Vladimir in forum Qt Programming
    Replies: 2
    Last Post: 16th January 2007, 15:36

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.