Results 1 to 6 of 6

Thread: QML list and dynamically loaded content

  1. #1
    Join Date
    Aug 2011
    Posts
    38
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QML list and dynamically loaded content

    This is more probaply easy but how to detect in listview situation when list has been scrolled end of list and more data need to loaded from source? I'm using QML + C++ approach in my program (wake up from froze ... )

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


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

    Default Re: QML list and dynamically loaded content

    Maybe by using the change signal handler of atYEnd property?

    Cheers,
    _

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


  5. #3
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QML list and dynamically loaded content

    You should implement QAbstractItemModel::fetchMore and QAbstractItemModel::canFetchMore in your model, QML's views know how to use those.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  6. The following user says thank you to spirit for this useful post:


  7. #4
    Join Date
    Aug 2011
    Posts
    38
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QML list and dynamically loaded content

    thanks spirit. It was just I want it ...

    However, I got another problem in this area, I have

    qmlRegisterUncreatableType<Status>("Status", 1, 0,
    "c_status", "");

    and qml file has defination :

    import Status 1.0

    but qml define undeline with red line and with error message "QML Module not found". What its needed ? Status is Q_ENUM.

  8. The following user says thank you to matsukan for this useful post:


  9. #5
    Join Date
    Aug 2011
    Posts
    38
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QML list and dynamically loaded content

    Ok,

    enums seems to be work even underlined text in import statement. Thread can close now. thanks

  10. The following user says thank you to matsukan for this useful post:


  11. #6
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,420
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QML list and dynamically loaded content

    It is underlined because Qt Creator doesn't know about it.

    The type is registered by your application's C++ code, so it is available to the QML scene at runtime.

    Cheers,
    _

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


Similar Threads

  1. Rendering Content Dynamically
    By nabeel in forum Newbie
    Replies: 4
    Last Post: 29th August 2013, 09:37
  2. Replies: 12
    Last Post: 24th October 2011, 07:56
  3. Replies: 2
    Last Post: 8th January 2009, 00:49
  4. Replies: 8
    Last Post: 20th September 2007, 09:10

Tags for this Thread

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.