Results 1 to 2 of 2

Thread: Model View in Qt Quick vs C++

  1. #1
    Join Date
    Jan 2007
    Posts
    92
    Thanks
    14
    Thanked 1 Time in 1 Post

    Default Model View in Qt Quick vs C++

    Hi All,

    I have basic question about choosing model view structure between Qt Quick build components vs custom model classes defined in C++ that inherit from QAbstractListModel. In Qt 4.8, I used to create model that inherit from QAbstractItemModel and create a qml object that handles the View and bind them using signals and slots.

    Moving forward with Qt 5.01 and Qt Quick Components : Is this still an recommendable approach to use create listview stuff ? Or should I use only built-in QML elements like ListModel and XmlListModel.

    Will QAbstractListModel be always supported (backward compatible) moving forward with QML and QT5.

    I am using Qt 5.0.1 (Qt quick components are built against stable branch).

    Thanks a lot.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Model View in Qt Quick vs C++

    Most real-world models are and will be implemented in C++ using one of the abstract classes as their base, e.g. QAbstractListModel for lists.

    Creating/Filling models in QtQuick is a nice way for fixed things or prototyping but it will hardly replace C++ model implementations for things like dynamic content, etc.

    Cheers,
    _

  3. The following user says thank you to anda_skoa for this useful post:

    user_mail07 (26th April 2013)

Similar Threads

  1. Replies: 4
    Last Post: 18th April 2012, 19:11
  2. Replies: 0
    Last Post: 21st April 2010, 13:23
  3. Replies: 1
    Last Post: 1st February 2010, 19:42
  4. QSql Model-View: How to keep view in sync with model
    By schall_l in forum Qt Programming
    Replies: 1
    Last Post: 23rd December 2008, 00:31
  5. quick question on model/view programming
    By locus in forum Qt Programming
    Replies: 1
    Last Post: 2nd February 2007, 11:04

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.