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. QML Code not running

QML Code not running

Scheduled Pinned Locked Moved QML and Qt Quick
14 Posts 5 Posters 7.9k 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.
  • D Offline
    D Offline
    doforumda
    wrote on last edited by
    #1

    hi

    i just install nokia qt sdk on windows 7. Now i am trying to run qml code of hello world. It says "The process could not be started!". help please

    1 Reply Last reply
    0
    • A Offline
      A Offline
      anselmolsm
      wrote on last edited by
      #2

      More information, please.

      Anselmo L. S. Melo (anselmolsm)

      1 Reply Last reply
      0
      • D Offline
        D Offline
        doforumda
        wrote on last edited by
        #3

        here is my code
        helloWorld.qmlproject
        @
        /* File generated by QtCreator */

        import QmlProject 1.0

        Project {
        /* Include .qml, .js, and image files from current directory and subdirectories /
        QmlFiles {
        directory: "."
        }
        JavaScriptFiles {
        directory: "."
        }
        ImageFiles {
        directory: "."
        }
        /
        List of plugin directories passed to QML runtime */
        // importPaths: [ "../exampleplugin" ]
        }
        @

        helloWorld.qml
        @
        import Qt 4.7

        Rectangle {
        width: 200
        height: 200
        Text {
        x: 66
        y: 93
        text: "Hello World"
        }
        }
        @

        this is the error
        @
        Starting D:/NokiaQtSDK/QML/helloWorld/helloWorld.qml
        The process could not be started!
        @

        this is the information. Can you please tell me what sort of information do you need to solve this particular problem?

        1 Reply Last reply
        0
        • K Offline
          K Offline
          Kxyu
          wrote on last edited by
          #4

          well, that's because D:/NokiaQtSDK/QML/helloWorld/helloWorld.qml is not executable)
          qml should be opened with qmlviewer

          1 Reply Last reply
          0
          • D Offline
            D Offline
            doforumda
            wrote on last edited by
            #5

            but when i try this same code in ubuntu it works. but on windows it doesnt. Can you tell me how can i make it executable?

            1 Reply Last reply
            0
            • D Offline
              D Offline
              doforumda
              wrote on last edited by
              #6

              on ubuntu it works because i did not install nokia qt sdk on that i simply installed Qt Creator May be that is the reason it works on ubuntu. But i still need help on how can i make this code executable

              1 Reply Last reply
              0
              • F Offline
                F Offline
                fcrochik
                wrote on last edited by
                #7

                You can't make qml into executable files. What you can do is create a cpp wrapper application around your qml code.

                If you download the qt creator beta 2.1 there is a "qml application" project template that should give you what you are looking for.

                Certified Specialist & Qt Ambassador <a href="http://www.crochik.com">Maemo, Meego, Symbian, Playbook, RaspberryPi, Desktop... Qt everywhere!</a>

                1 Reply Last reply
                0
                • F Offline
                  F Offline
                  fcrochik
                  wrote on last edited by
                  #8

                  By the way: if you install the qt creator beta you should be able to start the qml viewer from qt-creator using CTRL+R.

                  Certified Specialist & Qt Ambassador <a href="http://www.crochik.com">Maemo, Meego, Symbian, Playbook, RaspberryPi, Desktop... Qt everywhere!</a>

                  1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    doforumda
                    wrote on last edited by
                    #9

                    it is working fine in Qt creator. The problem is when i run the same code in Nokia Qt SDK in windows then it displays me this error. In Linux its perfect.

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      strekazoid
                      wrote on last edited by
                      #10

                      Have you tried launching qmlviewer.exe in Windows?

                      1 Reply Last reply
                      0
                      • D Offline
                        D Offline
                        doforumda
                        wrote on last edited by
                        #11

                        how can i launch qmlviewer? i think it is launched when you start qt creator in nokia qt sdk

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          strekazoid
                          wrote on last edited by
                          #12

                          You can launch any qml app with qmlviewer. It is located in qt\bin folder. Just launch it, and then open your qml file in it.

                          1 Reply Last reply
                          0
                          • D Offline
                            D Offline
                            doforumda
                            wrote on last edited by
                            #13

                            i could not find qmlviewer in qt/bin folder. I have a bin folder in QtCreator folder. like QtCreator/bin but there is no such thing as qmlviewer

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              strekazoid
                              wrote on last edited by
                              #14

                              No no, not Qt Creator. The actual Qt. Usually it is located somewhere in c:\qt\4.7.0\qt\bin.

                              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