Results 1 to 2 of 2

Thread: Loading additional QML files

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #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: Loading additional QML files

    Quote Originally Posted by jforejtn View Post
    (1) Am I using correct approach for dynamic loading of Items defined in *.QML file?
    Your case looks much more like the use case of a Loader.

    A general rule of thumb is that you do not attempt to access QML created objects by objectName and findChild/findChildren.
    This kind of dependency inversion (C++ code depending on specific objects in QML) is almost always a bad idea.

    Quote Originally Posted by jforejtn View Post
    (2) What could be the cause for the reference errors?
    Maybe order of deletion gone wrong.
    Try to not set JavaScriptOwnership, the QObject parent should be enough.

    But again, this looks like a classic Loader scenario to me.

    Cheers,
    _

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

    jforejtn (4th February 2019)

Similar Threads

  1. QML files loading
    By parfait in forum Newbie
    Replies: 6
    Last Post: 25th June 2013, 07:14
  2. Loading 3DS files??
    By xleniz in forum Newbie
    Replies: 1
    Last Post: 24th February 2012, 02:26
  3. Loading files using Qt
    By A.H.M. Mahfuzur Rahman in forum Qt Programming
    Replies: 2
    Last Post: 9th June 2009, 17:34
  4. XCode and additional files
    By themolecule in forum Qt Programming
    Replies: 0
    Last Post: 6th May 2008, 06:57
  5. Loading TGA files
    By ChMaster in forum Qt Programming
    Replies: 2
    Last Post: 28th June 2007, 09:55

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.