Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to mix QML view part with a Qt model code.
Forum Updated to NodeBB v4.3 + New Features

How to mix QML view part with a Qt model code.

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 3 Posters 826 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Charlie_Hdz
    wrote on last edited by
    #1

    Hi, Im looking for some information of how can I make a program using QML as view code and the other code (model) with normal Qt code.

    Well, I saw this articles "Integrating QML ...":http://qt-project.org/doc/qt-4.8/qml-integration.html and "Using QML":http://qt-project.org/doc/qt-4.8/qtbinding.html but I think I need some examples or more information about ...

    Any help, will be grateful.

    Charlie Hdz, Wiwiped

    Kind Regards,
    Enrique Hernandez
    gearstech.com.mx
    chernandez@gearstech.com.mx

    1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      Hi,

      For Qt5 see "this":http://doc.qt.io/qt-5/qtquick-modelviewsdata-cppmodels.html and for Qt4, "this":http://qt-project.org/doc/qt-4.8/qdeclarativemodels.html.

      157

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        qxorm
        wrote on last edited by
        #3

        If you are looking for another example, you can take a look at "the QxModelView module of QxOrm library":http://www.qxorm.com/doxygen/html/group___qx_model_view.html : this is an implementation of the QAbstractItemModel Qt class and allows to display in QML views (and Qt Widgets too) all classes/properties registered into QxOrm context.

        The source code is available in the QxOrm package.
        There is a FAQ here : http://www.qxorm.com/qxorm_en/faq.html#faq_300
        And there is a sample project in the ./test/qxBlogModelView/ directory of QxOrm package.

        And with QxEntityEditor, you can also generate the source code for nested models to manage relationships between entities (1-n, n-1, n-n, 1-1).

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved