Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Creation of QApplication takes a LONG time
QtWS25 Last Chance

Creation of QApplication takes a LONG time

Scheduled Pinned Locked Moved Mobile and Embedded
7 Posts 2 Posters 3.2k Views
  • 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 Offline
    B Offline
    bkamps
    wrote on last edited by
    #1

    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
    0
    • G Offline
      G Offline
      GentooXativa
      wrote on last edited by
      #2

      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
      0
      • B Offline
        B Offline
        bkamps
        wrote on last edited by
        #3

        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
        0
        • G Offline
          G Offline
          GentooXativa
          wrote on last edited by
          #4

          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
          0
          • B Offline
            B Offline
            bkamps
            wrote on last edited by
            #5

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

            1 Reply Last reply
            0
            • G Offline
              G Offline
              GentooXativa
              wrote on last edited by
              #6

              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
              0
              • B Offline
                B Offline
                bkamps
                wrote on last edited by
                #7

                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
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved