Results 1 to 8 of 8

Thread: deploy resulable QML files

Hybrid View

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

    Quote Originally Posted by doulos View Post
    been there, read that. However, the documentation only mentions plugins as a way to implement complex backend logic and integrate it with QML.
    Yes, that's one the things a module can do-

    Quote Originally Posted by doulos View Post
    not true. If you look, theres several dozen .qml files beneath the qml directory in your Qt install path. These files are imported directly from the filesystem by a QtQuick application at runtime.
    A module doesn't have to be a single file. It can be implemented as just a shared library (e.g. QtQml.Models), a directory with QML files, a combination of both (e.g. QtQuick.Controls)

    Cheers,
    _

  2. #2
    Join Date
    Jul 2014
    Location
    Gelnhausen, Germany
    Posts
    21
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: deploy resulable QML files

    A module doesn't have to be a single file. It can be implemented as just a shared library
    if you read my second post, I was talking about a QML plugin (shared library) specifically. So lets keep the term module aside and focus on that. My "achievement" was to maintain QML files within a plugin and publish them from there, which allows me to deploy just on file (2, actually, because of that nasty qmldir file)

  3. #3
    Join Date
    Jul 2014
    Location
    Gelnhausen, Germany
    Posts
    21
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: deploy resulable QML files

    Below is an "official" statement (from here) that describes why deploying reusable QML in the form of a compiled plugin makes a lot of sense. Now, what I would really love to see is the removal of the qmldir file (the only remaining non-compiled filesystem artifact). Why not let the shared lib provide ALL the meta information - which would basically only require adding a "registerNamespace" function.

    Compiled Qt Quick

    With Qt 5.3 we are introducing a first look at a new professional build tool available under the Qt Enterprise version, Qt Quick Compiler. The compiler takes QML files and compiles them to native code showing a big difference in performance on operating systems where one cannot use a Just in time compiler, namely iOS and WinRT.

    The compiler is also very useful to improve load times of QML user interfaces, as all of the parsing work now happens at compile time. This is especially interesting for startup times of applications and boot times of devices using Qt Quick for the user interface.

    Finally, the compiler helps keep your source code safe, as it is now no longer necessary to ship the sources of your QML-based application.

    Check out the documentation for more details.

  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: deploy resulable QML files

    You could likely provide a patch that uses Q_PLUGIN_METADATA or a similar mechanism to store the qmldir inside the binary and have the plugin loader look for it there as well.

    Cheers,
    _

Similar Threads

  1. Replies: 5
    Last Post: 30th October 2012, 08:52
  2. Replies: 1
    Last Post: 15th August 2011, 23:26
  3. Replies: 12
    Last Post: 17th June 2009, 05:34
  4. visual studio project files - adding extra files
    By luf in forum Qt Programming
    Replies: 3
    Last Post: 13th June 2008, 21:05
  5. how to save sequences of text files and sound files
    By nagpalma in forum Qt Programming
    Replies: 8
    Last Post: 3rd July 2007, 00:06

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
  •  
Qt is a trademark of The Qt Company.