Results 1 to 4 of 4

Thread: memory problem dynamic creation model

  1. #1
    Join Date
    Mar 2016
    Posts
    9
    Qt products
    Qt5
    Platforms
    MacOS X

    Default memory problem dynamic creation model

    hello,
    i have a list view we at create when a clicked, clear() and append({name: wrapper.name(i)})
    33 items appended, i stop at 4..
    listview is create for setting dynamical object.

    if object is static, no problem.


    when a clear() object we is add dynamicly is free?

    thank's

  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: memory problem dynamic creation model

    Not sure I understand what you are asking.
    If you clear the model then the view will have nothing to display and delete all its delegate instances.

    Cheers,
    _

  3. #3
    Join Date
    Mar 2016
    Posts
    9
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: memory problem dynamic creation model

    thank's to answer me.
    i have two listView, if currentrow change in first, the second is recalculate.(clear and append {name:""}), delegate dispay name
    in this case is very strange that the same code with object static is diferent comportment that is dynamic.
    in this two case, object who use to iterate is completed. but his stopped at four iteration, legnth = 36


    an idea?
    cheers

  4. #4
    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: memory problem dynamic creation model

    No, sorry, I still don't get quite what the problem seems to be.

    - You have a model
    - The model is shown in a ListView
    - You clear the model and append one entry

    The ListView does not show that entry?

    Cheers,
    _

Similar Threads

  1. Dynamic creation of Scale object
    By Mookie in forum Qt Quick
    Replies: 4
    Last Post: 28th March 2016, 16:13
  2. Dynamic creation of list<transform>
    By Mookie in forum Qt Quick
    Replies: 1
    Last Post: 27th March 2016, 16:26
  3. QMetaType dynamic object creation and initialization
    By d_stranz in forum Qt Programming
    Replies: 5
    Last Post: 24th July 2014, 11:12
  4. Dynamic creation of widget with N images
    By davethomaspilot in forum Qt Programming
    Replies: 1
    Last Post: 30th March 2014, 13:45
  5. Dynamic widget creation from an XML-like file
    By ttvo in forum Qt Programming
    Replies: 2
    Last Post: 1st June 2009, 23:15

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.