Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 1 Support › QT emulation Layer crashed (1:0)

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #5783

    farhanx

    Hi ,

     

    I made a small QML file to test , when i open this inside designer it shows me this error on the screen QT emulation Layer crashed (1:0) Go to error. When i click go to error it takes me to the QML file which is look like below. Kindly tell me how to solve this error…

     

    import QtQuick 1.1
    import VPlay 1.0
    
    
    SceneBase {
        id: farhanScene
    
        Text {
            text: "Something that you want to show"
            color: "white"
            anchors.centerIn: parent
        }
    
        // back button to leave scene
        SimpleButton {
            text: "Back to menu"
            anchors.right: parent.right
            onClicked: backPressed()
        }
    
    
    }
    

     

    #5784

    Alex
    Felgo Team

    Hi,

    the SimpleButton is causing this error. Some Felgo components are not fully supported within the design view.

    You could replace the button with a Rectangle, change the layout in the design view, and then copy the values that the designer determined to the button.

    Cheers,
    Alex

    #5785

    farhanx

    The designer is very strange , whatever i am designing it does not reflect it on execution. For e.g making font italic , making gradeint rectangle are not getting render. Also how can i add onclick function on rectangle , it says property is unidentified

     

    import QtQuick 1.1
    import VPlay 1.0
    
    
    SceneBase {
        id: farhanScene
    
        Text {
            x: -167
            y: -3
            text: "Something that you want to show"
            font.italic: true
            font.pointSize: 15
            opacity: 1
            verticalAlignment: Text.AlignVCenter
            styleColor: "#cc1d1d"
            font.bold: true
            anchors.verticalCenterOffset: 9
            anchors.horizontalCenterOffset: 6
            color: "white"
            anchors.centerIn: parent
        }
    
        Rectangle {
            id: rectangle1
            x: -59
            y: -67
            width: 101
            height: 19
            radius: 6
            transformOrigin: Item.Center
            opacity: 1
            smooth: true
            anchors.left: parent.left
            anchors.leftMargin: -59
            anchors.right: parent.right
            anchors.rightMargin: -42
    
    
    
            gradient: Gradient {
                GradientStop {
                    position: 0
                    color: "#ffffff"
                }
    
                GradientStop {
                    position: 0.090
                    color: "#ffffff"
                }
    
                GradientStop {
                    position: 0.980
                    color: "#715f5f"
                }
    
                GradientStop {
                    position: 1
                    color: "#000000"
                }
            }
    
            TextInput {
                id: text_input1
                x: 32
                y: 5
                width: 31
                height: 20
                text: qsTr("Back")
                anchors.horizontalCenter: parent.horizontalCenter
                anchors.verticalCenter: parent.verticalCenter
                font.pixelSize: 12
            }
    
        }
    
        /*
        // back button to leave scene
        SimpleButton {
            text: "Back to menu"
            anchors.right: parent.right
            onClicked: backPressed()
        }
    */
    
    
    }
    

     

     

     

    #5786

    farhanx

    is it because i have QT creator version 2.4.1 ???? Kindly explain which help should i follow the help with Felgo is not helping me to resolve this issue. Or should i just do  manual work rather then by using designer?

    #5787

    Christian
    Felgo Team

    Hi Farhan,

    please upgrade to latest Qt Creator 2.8.1 which has an improved QML designer. You can follow our guide how to install it here.

    The way I usually use the QML designer is to adjust the positions of items, and wait for changing “more complex” properties like an italic font until the very end when I have set the basic positioning of the items, because QML designer sometimes is not capable of showing a preview for some properties.

    What I do in later steps of the game development, is to change the properties while the game is running. You can do that with the following steps:

    1.) Go to Projects, then to the Run tab, and select in the Debugger Settings “Enable QML”.

    This allows you to change QML properties at runtime and see the effects immediately, while the game is running!

    2.) Press the debug button or F5 on Windows to start a debug session.

    3.) You can now edit the qml files and change any properties by just saving the file.

    This allows for very short turnaround times and you can set up UIs quickly.

    Cheers, Chris

    #5793

    farhanx

    Hi,

     

    After installation of new QTcreator 2.8.1 i have copied wizards from old qtcreator to the new one and now i am trying to create a new template but the target KIT is coming as an empty and not detecting any KIT. In documentation there nothing mention about this …? I am from VC++ background but so i am not sure how to adjust this??? I tried manually adding compiler but seems like i am lost and unable to press next.

    #5794

    Christian
    Felgo Team

    Hi Farhan, please use the instructions I gave in this forum post, how to configure the Kit. This information will be added to the installation doc of the next Felgo daily build update, probably coming next week.

    Cheers, Chris

    #5800

    farhanx

    Hi Chris ,

    I have configured kit now , but now when i go in qml designer it shows the following error message

    QML Module not found

    followed by import paths and some vague tip about QML_IMPORT_PATH and importPaths property

     

    Seems like its not able to find v-Play include files because on vplayapplication.h it says no such file or directory….but it is compiling and running successfully…

    #5803

    Christian
    Felgo Team

    Hi Farhan,

    did you try to close and then restart QtCreator? The first time configured, the import paths cannot be found.

    Cheers, Chris

    #5805

    farhanx

    Hi Chris ,

     

    Yes  i did closed and open QT Creator  many times but it still shows the same error. But if i open old qtcreator then i dont see this error…

     

    I have installed the new qtcreator and then i have copied wizard files from old qt to new qt’s wizard directory then i have adjusted mingw and kit. After that it compiles and even debug but qt designer shows this error and the main source cpp file  with header file shows green line under the vplayapplication.h file with error “no such file or directory”.

     

    regards

    #5806

    Christian
    Felgo Team
    #5808

    farhanx

    Hi Chris,

     

    I have followed both solution non work , i have windows 7 32 bit , i found one thing in environment variables of  PATH in new QT was
    D:\SDK\FelgoSDK\Desktop\Qt\4.8.1\mingw\bin;

    D:\SDK\FelgoSDK\mingw\bin;

     

    while in old one it was

     

    D:\SDK\FelgoSDK\mingw\bin;

    D:\SDK\FelgoSDK\Desktop\Qt\4.8.1\mingw\lib;

    D:\SDK\FelgoSDK\Desktop\Qt\4.8.1\mingw\bin;

     

    So i have edit the environment variable in new QT creator and compiled it it runs fine as before it compile fine as before but still QML module not found and Vplay header file seems unable to find through editor like i wrote in my previous post.

     

    Then i have closed and then re open it again still same issue.

    I clicked on RUN to see Build environment variables

     

    New QT Creator

    D:\SDK\FelgoSDK\Desktop\Qt\4.8.1\mingw\lib;
    D:\SDK\FelgoSDK\Desktop\Qt\4.8.1\mingw\..\..\..\FelgoSDK\lib\mingw\third_party;
    D:\SDK\FelgoSDK\Desktop\Qt\4.8.1\mingw\..\..\..\FelgoSDK\lib\mingw;
    D:\SDK\FelgoSDK\Desktop\Qt\4.8.1\mingw\bin;
    D:\SDK\FelgoSDK\Desktop\Qt\4.8.1\mingw\lib;
    D:\SDK\FelgoSDK\mingw\bin;

     

    Old QT Creator

    D:\SDK\FelgoSDK\Desktop\Qt\4.8.1\mingw\..\..\..\FelgoSDK\lib\mingw\third_party;
    D:\SDK\FelgoSDK\Desktop\Qt\4.8.1\mingw\..\..\..\FelgoSDK\lib\mingw;
    D:\SDK\FelgoSDK\Desktop\Qt\4.8.1\mingw\bin;
    D:\SDK\FelgoSDK\Desktop\Qt\4.8.1\mingw\lib;
    D:\SDK\FelgoSDK\mingw\bin;

     

    Its been whole one day gone and i am still unable to find the reason of this issue.

    #5810

    Christian
    Felgo Team

    Hi Farhan,

    this seems like a really strange issue – I tried to use this simple scene on two different PCs with Qt Creator 2.4.1 that comes with the V-Pla SDK and the latest 2.8.1, and both work fine:

    import QtQuick 1.1
    import VPlay 1.0
    
    GameWindow {
      Scene {
        id: farhanScene
    
        Text {
          text: "Something that you want to show"
          color: "white"
          anchors.centerIn: parent
        }
      }
    }
    

    Is this simple demo not working in your QtCreator 2.8., but in 2.4?

     

    To find the issue, could you please right click on your project and then select “Run qmake”, and then copy the output from the “Compile Output” Pane (press Alt+5 or just select it in the bottom of Qt Creator) and paste it here?

     

    Also, when you hover over the “import VPlay 1.0” statement in the QML code editor, is it successfully resolved and which message is shown there? (It should be something like “Library at … Read typeinfo file successfully.”. Or is your import VPlay statement underlined?

     

    If you want to start programming right now, you could use the old Qt Creator for basic designing of your scene (there it works fine right?), and also to program your game logic. Qt Designer has its hickups and I usually prefer the way I described above to change properties at runtime for quickly setting up UI elements in a scene, because you have a real version of your app running not just the static design version. I see the usefulness of Qt Designer mostly to quickly set up basic buttons in, for example, the main menu scene, because for writing code you spend your time in the code editor most anyway.

    Cheers, Chris

    #5813

    farhanx

    Hi Chris,

    Thanks for your help , Okay i am finally able to make it work i uninstalled the whole QTcreator and then re-installed it..then i made the sysroot field empty (This was the reason of showing those two errors) …which was automatically having a path in new qt creator. After doing that QTcreator is stop showing those two errors… this is now solve.

     

    However now inside the QML file if i change the rectangle with gradient it does show the effect on the DESIGNER but when i run this application it does not show the gradient color at all. Secondly whatever position i adjust for rectangle it render on run-time on the different place while on preview the designer works fine. In designer i can format my text to italic but runtime it shows non-italic… Why this is happening??

     

    #5815

    Christian
    Felgo Team

    Hi Farhan,

    what exactly did you to “make the sysroot field empty”? This might be interesting for other developers having this problem. I’m still wondering why this was not required on my PCs where it worked fine out of the box.

     

    The second question is a bit trickier:

    To get the maximum performance on mobile devices, we have implemented a custom version of a cocos2d-x renderer instead of the default Qt renderer. This change allows to render with 60fps and lots of animated sprites, which is not possible with the Qt renderer. This also means, however, that we do not support all properties of Rectangle and Text component in our renderer. The currently not supported properties are exactly the ones you are trying to change! So no italic fonts and no gradients/radius/borders are possible until our next major update of the renderer early 2014! However, from a performance point of view I still discourage to use the Rectangle element in production games, because there rendering is slower than images. The best option you have, is designing any buttons as images where you can make them rounded and with custom gradients, and then render these buttons as images instead of Rectangles.

    Cheers, Chris

Viewing 15 posts - 1 through 15 (of 17 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded