Results 1 to 2 of 2

Thread: Create multiple instances of qml object

  1. #1
    Join Date
    Dec 2018
    Qt products

    Default Create multiple instances of qml object


    In my programm, the user can create Objects in the GUI during runtime, which are created from a QML file with a javascript.
    After creation the user can change the properties of this qml object, like size, position, color etc..

    My target is now, to store these changed properties and the QML Objects, so they are automatically recreated after programm start.

    Any ideas how to solve this?


  2. #2
    Join Date
    Jan 2006
    Graz, Austria
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Unix/X11 Windows

    Default Re: Create multiple instances of qml object

    Instead of creating these objects in JavaScript you create a model that contains each item's data.

    Then use for example a Repeater to create the items visually.

    The model can then save and load its state anytime you'd like.


Similar Threads

  1. Replies: 3
    Last Post: 24th August 2015, 21:51
  2. Replies: 2
    Last Post: 19th October 2011, 09:30
  3. Multiple instances of QWebView
    By darious in forum Qt Programming
    Replies: 1
    Last Post: 11th October 2011, 07:55
  4. Multiple program instances
    By scwizard in forum Qt Programming
    Replies: 13
    Last Post: 1st April 2007, 17:42
  5. Signal-Slot, object instances
    By ct in forum Qt Programming
    Replies: 3
    Last Post: 16th February 2006, 19:08


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.