跳到內容
  • 版面
  • 最新
  • 標籤
  • 熱門
  • 使用者
  • 群組
  • 搜尋
  • Get Qt Extensions
  • Unsolved
Collapse
品牌標誌
  1. 首頁
  2. Qt Development
  3. Installation and Deployment
  4. Compile QT 5.8 to cross-compile Beaglebone
Forum Updated to NodeBB v4.3 + New Features

Compile QT 5.8 to cross-compile Beaglebone

已排程 已置頂 已鎖定 已移動 Unsolved Installation and Deployment
53 貼文 5 Posters 32.3k 瀏覽 3 Watching
  • 從舊到新
  • 從新到舊
  • 最多點贊
回覆
  • 在新貼文中回覆
登入後回覆
此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
  • A Andrey Shmelew

    @jsulm
    it is located in beaglebone's /usr folder when deployed.

    When i develop -main.qml is located on windows C:/qtqml57/main.qml ( qtqml57 is qt 5 project folder)

    jsulmJ 離線
    jsulmJ 離線
    jsulm
    Lifetime Qt Champion
    寫於 最後由 編輯
    #41

    @Andrey-Shmelew Quite unusual location.
    Can you describe how the layout of your app is?
    Is it like this:

    /usr/YOUR_APP_EXECUTABLE
    /usr/main.qml
    

    ?

    https://forum.qt.io/topic/113070/qt-code-of-conduct

    A 1 條回覆 最後回覆
    0
    • jsulmJ jsulm

      @Andrey-Shmelew Quite unusual location.
      Can you describe how the layout of your app is?
      Is it like this:

      /usr/YOUR_APP_EXECUTABLE
      /usr/main.qml
      

      ?

      A 離線
      A 離線
      Andrey Shmelew
      寫於 最後由 Andrey Shmelew 編輯
      #42

      @jsulm
      by default it is:

      project:
      windows 10, project path C:/qtqml57/

      alt text

      after rebuild it's deployed in Linux /usr/ directory

      jsulmJ 1 條回覆 最後回覆
      0
      • A Andrey Shmelew

        @jsulm
        by default it is:

        project:
        windows 10, project path C:/qtqml57/

        alt text

        after rebuild it's deployed in Linux /usr/ directory

        jsulmJ 離線
        jsulmJ 離線
        jsulm
        Lifetime Qt Champion
        寫於 最後由 編輯
        #43

        @Andrey-Shmelew can you please show how it looks like in /usr? Is it like I asked above? So, how does the deploy directory (/usr in your case) look like?

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        A 1 條回覆 最後回覆
        0
        • jsulmJ jsulm

          @Andrey-Shmelew can you please show how it looks like in /usr? Is it like I asked above? So, how does the deploy directory (/usr in your case) look like?

          A 離線
          A 離線
          Andrey Shmelew
          寫於 最後由 Andrey Shmelew 編輯
          #44

          @jsulm

          sorry for annoying

          i just added to a .pro file as usual :

          target.path  = /usr
          INSTALLS    += target
          DISTFILES +=
          
          

          now on my beaglebone /usr/ folder looks like

          alt text

          jsulmJ 2 條回覆 最後回覆
          0
          • A Andrey Shmelew

            @jsulm

            sorry for annoying

            i just added to a .pro file as usual :

            target.path  = /usr
            INSTALLS    += target
            DISTFILES +=
            
            

            now on my beaglebone /usr/ folder looks like

            alt text

            jsulmJ 離線
            jsulmJ 離線
            jsulm
            Lifetime Qt Champion
            寫於 最後由 編輯
            #45

            @Andrey-Shmelew You should really upload a bigger picture - it is nearly impossible to see anything. I tried hard but could not find main.qml file there. So, where is it?

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            A 1 條回覆 最後回覆
            0
            • A Andrey Shmelew

              @jsulm

              sorry for annoying

              i just added to a .pro file as usual :

              target.path  = /usr
              INSTALLS    += target
              DISTFILES +=
              
              

              now on my beaglebone /usr/ folder looks like

              alt text

              jsulmJ 離線
              jsulmJ 離線
              jsulm
              Lifetime Qt Champion
              寫於 最後由 編輯
              #46

              @Andrey-Shmelew And you should not pollute /usr with files of your app. It is better to use /opt/YOUR_APP_NAME.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 條回覆 最後回覆
              0
              • jsulmJ jsulm

                @Andrey-Shmelew You should really upload a bigger picture - it is nearly impossible to see anything. I tried hard but could not find main.qml file there. So, where is it?

                A 離線
                A 離線
                Andrey Shmelew
                寫於 最後由 編輯
                #47

                @jsulm

                sorry about that, picture is really small

                and there is no main.qml in /usr

                jsulmJ 1 條回覆 最後回覆
                0
                • A Andrey Shmelew

                  @jsulm

                  sorry about that, picture is really small

                  and there is no main.qml in /usr

                  jsulmJ 離線
                  jsulmJ 離線
                  jsulm
                  Lifetime Qt Champion
                  寫於 最後由 編輯
                  #48

                  @Andrey-Shmelew That's why it is not working

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  A 1 條回覆 最後回覆
                  0
                  • jsulmJ jsulm

                    @Andrey-Shmelew That's why it is not working

                    A 離線
                    A 離線
                    Andrey Shmelew
                    寫於 最後由 編輯
                    #49

                    @jsulm
                    so if i upload main.qml to beaglebone's /usr/ folder then i get :

                    QQuickView only supports loading of root objects that derive from QQuickItem.

                    If your example is using QML 2, (such as qmlscene) and the .qml file you
                    loaded has 'import QtQuick 1.0' or 'import Qt 4.7', this error will occur.

                    To load files with 'import QtQuick 1.0' or 'import Qt 4.7', use the
                    QDeclarativeView class in the Qt Quick 1 module.

                    jsulmJ 1 條回覆 最後回覆
                    0
                    • A Andrey Shmelew

                      @jsulm
                      so if i upload main.qml to beaglebone's /usr/ folder then i get :

                      QQuickView only supports loading of root objects that derive from QQuickItem.

                      If your example is using QML 2, (such as qmlscene) and the .qml file you
                      loaded has 'import QtQuick 1.0' or 'import Qt 4.7', this error will occur.

                      To load files with 'import QtQuick 1.0' or 'import Qt 4.7', use the
                      QDeclarativeView class in the Qt Quick 1 module.

                      jsulmJ 離線
                      jsulmJ 離線
                      jsulm
                      Lifetime Qt Champion
                      寫於 最後由 編輯
                      #50

                      @Andrey-Shmelew said in Compile QT 5.8 to cross-compile Beaglebone:

                      QDeclarativeView

                      It says what you should do: use QDeclarativeView instead of QQuickView

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      A 1 條回覆 最後回覆
                      0
                      • jsulmJ jsulm

                        @Andrey-Shmelew said in Compile QT 5.8 to cross-compile Beaglebone:

                        QDeclarativeView

                        It says what you should do: use QDeclarativeView instead of QQuickView

                        A 離線
                        A 離線
                        Andrey Shmelew
                        寫於 最後由 編輯
                        #51
                        此回覆已被刪除!
                        1 條回覆 最後回覆
                        0
                        • A 離線
                          A 離線
                          Andrey Shmelew
                          寫於 最後由 編輯
                          #52

                          ok, i solved the problem:
                          put manually main.qml into /usr/ folder

                          main.cpp

                          #include <QGuiApplication>
                          #include <QQmlApplicationEngine>
                          
                          int main(int argc, char *argv[])
                          {
                              QGuiApplication app(argc, argv);
                              QQmlApplicationEngine engine;
                              engine.load(QUrl(QStringLiteral("/usr/main.qml")));
                              return app.exec();
                          }
                          
                          
                          jsulmJ 1 條回覆 最後回覆
                          0
                          • A Andrey Shmelew

                            ok, i solved the problem:
                            put manually main.qml into /usr/ folder

                            main.cpp

                            #include <QGuiApplication>
                            #include <QQmlApplicationEngine>
                            
                            int main(int argc, char *argv[])
                            {
                                QGuiApplication app(argc, argv);
                                QQmlApplicationEngine engine;
                                engine.load(QUrl(QStringLiteral("/usr/main.qml")));
                                return app.exec();
                            }
                            
                            
                            jsulmJ 離線
                            jsulmJ 離線
                            jsulm
                            Lifetime Qt Champion
                            寫於 最後由 編輯
                            #53

                            @Andrey-Shmelew You should take a look at "Installing Files" in http://doc.qt.io/qt-5/qmake-advanced-usage.html to avoid manually copying the file. And you should construct the path at runtime, as I suggested before, else if you change the installation directory later you will need to change your code and rebuild the app.

                            https://forum.qt.io/topic/113070/qt-code-of-conduct

                            1 條回覆 最後回覆
                            2

                            • 登入

                            • Login or register to search.
                            • 第一個貼文
                              最後的貼文
                            0
                            • 版面
                            • 最新
                            • 標籤
                            • 熱門
                            • 使用者
                            • 群組
                            • 搜尋
                            • Get Qt Extensions
                            • Unsolved