Results 1 to 2 of 2

Thread: How to dynamically create list items from C++?

  1. #1
    Join Date
    Nov 2010
    Posts
    1
    Qt products
    Qt4
    Platforms
    Maemo/MeeGo

    Default How to dynamically create list items from C++?

    Hi.

    I was researching a way to implement the UI of my Qt C++ app with QML/QtQuick. I am a total newbie to it, and didn't find a obvious way from any tutorial, so I am asking here:

    Is it possible to dynamically create list items from C++?

    What I need is a list view with changing number of list items. I have the code ready to put something on (and off) the list, but then I hit a wall when researching how to actually do it with a view made with QML.

    I have seen that it is possible to add items to a QML view dynamically using javascript, but then again I have no idea how to communicate with it from my C++ code.

    Any help would be appreciated.

    regards,
    Heikki Siltala

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

    Default Re: How to dynamically create list items from C++?

    Quote Originally Posted by hesi View Post
    Is it possible to dynamically create list items from C++?
    What do you mean by that? You can use any Qt/C++ model with QML.
    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. Dynamically create SVG with QWebElement
    By yawar in forum Qt Programming
    Replies: 0
    Last Post: 11th April 2010, 04:53
  2. adding items in scroll area dynamically
    By Ezhil in forum Qt Programming
    Replies: 5
    Last Post: 22nd May 2009, 17:33
  3. finding dynamically create object
    By abrou in forum Newbie
    Replies: 2
    Last Post: 5th March 2008, 22:17
  4. dynamically create folders with QT
    By eleanor in forum Newbie
    Replies: 3
    Last Post: 13th March 2007, 12:40
  5. Problem in enabling QtreeWidget items dynamically
    By jyoti kumar in forum Qt Programming
    Replies: 10
    Last Post: 7th June 2006, 19:10

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.