Important: Please read the Qt Code of Conduct -

QML Code not running

  • 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

  • More information, please.

  • here is my code
    /* 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" ]

    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?

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

  • 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?

  • 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

  • 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.

  • 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.

  • 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.

  • Have you tried launching qmlviewer.exe in Windows?

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

  • 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.

  • 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

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

Log in to reply