Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML source code visible in executable.
Forum Updated to NodeBB v4.3 + New Features

QML source code visible in executable.

Scheduled Pinned Locked Moved QML and Qt Quick
5 Posts 3 Posters 1.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    wonna
    wrote on last edited by
    #1

    Hi,

    Apologies if this is a simple question, as I am new to QT.

    Could anyone advise me if it is possible to hide the QML source code in the compiled exe/app file, so you can't view it using a text editor etc?

    Thank you for your kind advice.

    Martin.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      You can use Qt's resource system. It's described "here":http://qt-project.org/doc/qt-5/qtquick-deployment.html

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • W Offline
        W Offline
        wonna
        wrote on last edited by
        #3

        Hi,

        Thank you for your advice, it's good to be here.

        I have tried using this method but the source of the qml file is still readable from inside the executable with a text editor. I does however compile all the c++ code and and qml together into a self contained executable.

        Is there a method that with encode the plain text of the qml file so simple viewing of the executable would not reveal the full qml source code.

        My application uses some c++ but most of the logic and interface is qml, so I would prefer it to be obscured in some way.

        Kind regards,

        Martin.

        1 Reply Last reply
        0
        • W Offline
          W Offline
          wonna
          wrote on last edited by
          #4

          Hi again,

          I have had some success adjusting the resource compression threshold flag, although not perfect it would stop some eager eyes from viewing the qml code. Is this the best solution available?

          Thank you for your time.

          Kind regards,

          Martin.

          1 Reply Last reply
          0
          • p3c0P Offline
            p3c0P Offline
            p3c0
            Moderators
            wrote on last edited by
            #5

            Hi,

            The only solution for this currently is to use "QtQuickCompiler":http://doc.qt.digia.com/QtQuickCompiler/. But unfortunately this is not available in Qt Open Source. If you have an enterprise license you can use it.

            157

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved