×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Feb 2011
    Posts
    2

    Import Other QML File In Code

    Hi ,

    Can some suggest how to call a second QML file from within one. Couldn't find anything regarding this in the documentation.

  2. #2
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: Import Other QML File In Code

    Hi
    The simpler way is to name the second QML file with a name that starts with capital letter (eg: MyComponent.qml) and you place it in the same directory of your main QML file.
    That component can be called by the first QML file (eg: main.qml) just defining the element as folllow:
    MyComponent {
    id: MyComponentLoadedFromAnoterFile
    ....
    }

  3. #3
    Registered User
    Join Date
    Jun 2011
    Posts
    3

    Re: Import Other QML File In Code


Similar Threads

  1. How to call/load another QML file from QML ?
    By cadlg in forum [Archived] Qt Quick
    Replies: 5
    Last Post: 2011-07-28, 09:15
  2. How QML handles RSS other than version 2.0?
    By useryy2 in forum [Archived] Qt Quick
    Replies: 1
    Last Post: 2011-05-18, 09:27
  3. QML Code in Qt Project
    By symbi4n_programmer in forum [Archived] Qt Quick
    Replies: 8
    Last Post: 2011-02-17, 17:56
  4. empty project in carbide c++ and import code
    By mohammadi458 in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 26
    Last Post: 2010-12-03, 15:55
  5. Free modem connection in 6680 ~ import to other phone?
    By maffooo in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2007-04-06, 16:24

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×