Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Creation of QApplication takes a LONG time

    Mobile and Embedded
    2
    7
    2825
    Loading More Posts
    • 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.
    • B
      bkamps last edited by

      I'm developing a QML app on an embedded device. Currently it takes a long time for our application to start (show a working user-interface).

      By debugging the application I have noticed the creation of QApplication object takes a long time (about 40 seconds) on our device. I have also run our application using strace and I noticed that Qt is looking for files a lot:

      @

      read(28, "VolumeWindow\tVolumeWindow.qml\nAu"..., 16384) = 293
      read(28, "", 16091) = 0
      close(28) = 0
      stat64("/i686-linux/QtQuick.1.0/qmldir", 0x8c6e13c) = -1 ENOENT (No such file or directory)
      lstat64("/i686-linux/QtQuick.1.0/qmldir", 0xbf83f4c0) = -1 ENOENT (No such file or directory)
      stat64("/work/sotas_m3/top/CI/.jenkins/workspace/Qt/host/opt/thales/usr/imports/QtQuick.1.0/qmldir", 0x8cd160c) = -1 ENOENT (No such file or directory)
      lstat64("/QtQuick.1.0/qmldir", 0xbf83f4c0) = -1 ENOENT (No such file or directory)
      stat64("/i686-linux/QtQuick.1/qmldir", 0x8c6e13c) = -1 ENOENT (No such file or directory)
      lstat64("/i686-linux/QtQuick.1/qmldir", 0xbf83f4c0) = -1 ENOENT (No such file or directory)
      @

      Is there are way to improve this? (Maybe generate a file location map so the application doesn't continously search for files? Or any other suggestions?

      1 Reply Last reply Reply Quote 0
      • G
        GentooXativa last edited by

        You tryed with QCoreApplication?

        Jose Vicente Giner Sanchez - Senior Mobile Developer

        www.gigigo.com

        C/ Dr. Zamenhof 36bis, 1ºA 28027 Madrid
        T: +34 917431436

        1 Reply Last reply Reply Quote 0
        • B
          bkamps last edited by

          I have an user interface application, so I have to use QApplication instead of QCoreApplication:

          @
          Detailed DescriptionThe QCoreApplication class provides an event loop for console Qt applications.

          This class is used by non-GUI applications to provide their event loop. For non-GUI application that uses Qt, there should be exactly one QCoreApplication object. For GUI applications, see QApplication.@

          1 Reply Last reply Reply Quote 0
          • G
            GentooXativa last edited by

            That works fine for me on Symbian devices, and took less time to launch:
            @
            Q_DECL_EXPORT int main(int argc, char *argv[])
            {
            // qInstallMsgHandler(GGG_MessageHandler);
            QScopedPointer<QCoreApplication> app(createApplication(argc, argv));

            ....

            return app.exec();
            

            }
            @

            Jose Vicente Giner Sanchez - Senior Mobile Developer

            www.gigigo.com

            C/ Dr. Zamenhof 36bis, 1ºA 28027 Madrid
            T: +34 917431436

            1 Reply Last reply Reply Quote 0
            • B
              bkamps last edited by

              I will try. Do you also use QML / QtQuick?

              1 Reply Last reply Reply Quote 0
              • G
                GentooXativa last edited by

                Yep, is a symbian belle app

                Jose Vicente Giner Sanchez - Senior Mobile Developer

                www.gigigo.com

                C/ Dr. Zamenhof 36bis, 1ºA 28027 Madrid
                T: +34 917431436

                1 Reply Last reply Reply Quote 0
                • B
                  bkamps last edited by

                  When I use QCoreApplication the application crashes on some mouse event.

                  Is there anything to do about the looking for all kinds of files:

                  @
                  5.lstat64("/i686-linux/QtQuick.1.0/qmldir", 0xbf83f4c0) = -1 ENOENT (No such file or directory)
                  @

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post