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. Compiled qml sources visible inside executable
Forum Updated to NodeBB v4.3 + New Features

Compiled qml sources visible inside executable

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
23 Posts 7 Posters 7.0k Views 4 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.
  • K Offline
    K Offline
    KH-219Design
    wrote on 3 Feb 2021, 18:57 last edited by
    #21

    @jobusch GOT IT.

    today is my most hacking-est day in a while.

    So I ended up here: https://en.wikipedia.org/wiki/List_of_file_signatures

    Noticed that 78 9C is a marker for zlib.

    So I took the python that you shared, chopped off everything that was in front of 78 9C.

    That left me with something like:

    bb = bytearray.fromhex("78 9c bd 95 6d 4f db 30 10 c7 df 23 f5 \
      3b 58 d9 0b 40 db d2 07 b1 09 55 94 09 ba 49 a0 \
      8d 17 ac 6c 7b ed 38 d7 c6 c2 b5 83 7d a1 14 c4 \
    
    ...
    

    I wrote that to a file named abc.zlib

    Then ran this (in bash terminal):

    zlib-flate -uncompress < abc.zlib  > out.qml
    

    And I now see your code:

    ...
    
            TabButton {
                id: tab1
                text: "<font color='white'>" + qsTr("Benutzer") + "</font>"
    
                background: Rectangle {
                            color: bar.currentIndex == 1 ? "#181818" : "black"
                }
                padding: 20
                //font.bold: bar.currentIndex == 1
                font.pixelSize: 22
            }
            TabButton {
                id: tab2
                text: "<font color='white'>" + qsTr("Einstellungen") + "</font>"
    
                background: Rectangle {
                            color: bar.currentIndex == 2 ? "#181818" : "black"
                }
                padding: 20
                //font.bold: bar.currentIndex == 2
                font.pixelSize: 22
    
            }
    
    ...

    www.219design.com
    Software | Electrical | Mechanical | Product Design

    1 Reply Last reply
    2
    • K Offline
      K Offline
      kibsoft
      wrote on 12 Jun 2022, 21:31 last edited by
      #22

      As a workaround we can use

      QMAKE_RESOURCE_FLAGS += -threshold 0
      

      for QMake projects. All the files from resources will be compressed and most part of the QML code will be hidden.
      The reason why all QML files are included to the final executable when QtQuickCompiler is turned on is described here.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sidsukana
        wrote on 4 Mar 2023, 14:59 last edited by
        #23
        This post is deleted!
        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