Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Error while deploying from Ubuntu 14.04 to Raspberry Pi 3
Forum Updated to NodeBB v4.3 + New Features

Error while deploying from Ubuntu 14.04 to Raspberry Pi 3

Scheduled Pinned Locked Moved Solved Installation and Deployment
5 Posts 3 Posters 1.7k 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.
  • M Offline
    M Offline
    MHermann
    wrote on last edited by MHermann
    #1

    Hi!

    I set up Qt 5.9.1 on Ubuntu 14.04 and I compiled Qt 5.9.1 for Raspberry Pi 3.
    After that I configured QtCreator for Raspberry Pi 3.
    So far so good.

    I created a standard Qt Quick Application for testing.
    On Ubuntu everything is fine.
    But when I am selecting the Kit for Raspi and try run it on the Raspi I get an error:

    QQmlApplicationEngine failed to load component
    file::/main.qml:-1 File not found
    

    This is the code in the main.cpp:

    #include <QGuiApplication>
    #include <QQmlApplicationEngine>
    
    int main(int argc, char *argv[])
    {
        QGuiApplication app(argc, argv);
        QQmlApplicationEngine engine;
        engine.load(QUrl("qrc:/main.qml"));
        if (engine.rootObjects().isEmpty())
            return -1;
    
        return app.exec();
    }
    
    

    Obviously there seems to be a problem with the ressources.
    I searched in the internet for a solution but without success.

    Has anyone an idea what the problem could be?

    Regards, MHermann

    1 Reply Last reply
    0
    • sneubertS Offline
      sneubertS Offline
      sneubert
      wrote on last edited by
      #2

      For remote targets you need to add a deploy step, to copy the application to the remote target. Is there something like

      target.path = /home/pi
      INSTALLS + = target
      

      in your .pro file?

      M 1 Reply Last reply
      0
      • sneubertS sneubert

        For remote targets you need to add a deploy step, to copy the application to the remote target. Is there something like

        target.path = /home/pi
        INSTALLS + = target
        

        in your .pro file?

        M Offline
        M Offline
        MHermann
        wrote on last edited by MHermann
        #3

        @sneubert: Thanks for your answer.
        I already added two lines like these to the end of my .pro file.
        The problem seems to be related to QtQuick.
        Because if I run a Qt Widgets Application it works on Ubuntu and on the Raspi.
        But if I try to run a Qt Quick Application it works on Ubuntu, but I get these two errors on the Raspi.

        QQmlApplicationEngine failed to load component
        file::/main.qml:-1 File not found
        

        I don't have that much experience with Qt and Raspi...
        Maybe there has to be an additional library or I have to install something on the Raspi or I have to set a path???

        P 1 Reply Last reply
        0
        • M Offline
          M Offline
          MHermann
          wrote on last edited by
          #4

          I found the problem and the solution.
          There were still old Qt 5.6 libraries on the Raspi.
          I copied the Qt libraries from the locally mounted Raspi image to the Raspi via rsync.
          And now the applications are running on the Raspi.

          1 Reply Last reply
          0
          • M MHermann

            @sneubert: Thanks for your answer.
            I already added two lines like these to the end of my .pro file.
            The problem seems to be related to QtQuick.
            Because if I run a Qt Widgets Application it works on Ubuntu and on the Raspi.
            But if I try to run a Qt Quick Application it works on Ubuntu, but I get these two errors on the Raspi.

            QQmlApplicationEngine failed to load component
            file::/main.qml:-1 File not found
            

            I don't have that much experience with Qt and Raspi...
            Maybe there has to be an additional library or I have to install something on the Raspi or I have to set a path???

            P Offline
            P Offline
            pfar94
            wrote on last edited by pfar94
            #5

            @MHermann Stuck with exact same problem. Can you be more specific on how you solved it? i don't understand the solution you put down here. can you be detailed?

            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