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. .bin file from qml
Qt 6.11 is out! See what's new in the release blog

.bin file from qml

Scheduled Pinned Locked Moved QML and Qt Quick
6 Posts 4 Posters 4.2k 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.
  • T Offline
    T Offline
    thahir1986
    wrote on last edited by
    #1

    how to make ubuntu binary file(.bin executable file) from qml UI file.

    yet not start ;)

    1 Reply Last reply
    0
    • M Offline
      M Offline
      milot.shala
      wrote on last edited by
      #2

      First create a Qt Quick Application not Qt Quick UI. Then you should be able to load your qml files through a QDeclarativeView then you can easily create executable files.

      1 Reply Last reply
      0
      • T Offline
        T Offline
        thahir1986
        wrote on last edited by
        #3

        i tried this way too...create a quick application and it generate the binary file for the main.cpp only....

        if i clicked the .bin file without qml means it only shows blank white screen...if i copy the qml in the .bin folder means it runs. ???

        yet not start ;)

        1 Reply Last reply
        0
        • D Offline
          D Offline
          DenisKormalev
          wrote on last edited by
          #4

          You need to put qml file into resource.

          1 Reply Last reply
          0
          • T Offline
            T Offline
            thahir1986
            wrote on last edited by
            #5

            @#include <QtGui/QApplication>
            #include "qmlapplicationviewer.h"

            int main(int argc, char *argv[])
            {
            QApplication app(argc, argv);

            QmlApplicationViewer viewer;
            viewer.setOrientation(QmlApplicationViewer::Auto);
            viewer.setMainQmlFile&#40;QLatin1String(":/new/main.qml"&#41;);
            
            viewer.show();
            
            return app.exec();
            

            }@

            <Unknown File>: File error for URL file:///root/qt_workout/qml/textbinary-build-desktop/:/new/main.qml

            yet not start ;)

            1 Reply Last reply
            0
            • S Offline
              S Offline
              syrianzoro
              wrote on last edited by
              #6

              You have to add
              Myfile.qrc

              @<!DOCTYPE RCC><RCC version="1.0">
              <qresource>
              <file>new/main.qml</file>
              </qresource>
              </RCC>@

              update .pro file add this line

              RESOURCES += Myfile.qrc

              Qt is the future

              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