Is Qt Quick in Qt 5.10.1 stable?



    1. Created a "Qt Quick Application - Empty", and design UI with QML designer ( add some layouts and controls)
    2. Compiled successfully
    3. Run the application, a windows shows, but it's empty (i.e. no controls in the window), the application crashes immediately, then Qt Creator crashes

    BTW, after some experience on QML (also its GUI designer), I don't like it. Though Qt Widgets is still good, I'm not so confident about the future of Qt currently. Anyway, best wishes for Qt.


  • Lifetime Qt Champion

    Hi,

    That's a bit too vague of a description, can you show your project ? Did you saw any warning/error when running your application ?


  • Moderators

    @jronald Qt releases, If out of beta are stable typically.

    QML works fine for me. Especially a simple example like you stated. I have not tried it with 5.10.1 but I can't imagine a .1 would all of a sudden break everything. At least it hasn't in the 18 years I've used Qt. ;)

    If you are a C++ programmer like I'm assuming you are since you are using Qt, it can take some serious getting used to in order to do QML. QML is javascripty and it is quite the difference in how we are used to doing guis. I have a tough time with QML as well and definitely prefer Qt Widgets. That could just be experience and comfort level though. Not saying QML is bad, when I played with it for a demo app I did it was really quite cool.

    As for the future of Qt, I'm sure it will be just fine. It's the backbone of a lot of major projects like KDE. So even if Qt decided to close up shop there are plenty of developers that would take it over and continue to develop it. Myself included. So it won't be going away any time soon. Also it's been around for 20+ years.. I'm not worried about it's future at all.

    I've done a lot of cross platform work in C++ and there is definitely no better GUI toolkit than Qt. If some better alternative comes along then I would be worried about Qt, but as of now, nothing comes close.



  • @SGaist No warning when compiling and linking. I can't upload the project as an attachment, not enough priviledge. I'll paste them here.

    main.cpp

    #include <QGuiApplication>
    #include <QQmlApplicationEngine>
    
    int main(int argc, char *argv[])
    {
        QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
    
        QGuiApplication app(argc, argv);
    
        QQmlApplicationEngine engine;
        engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
        if (engine.rootObjects().isEmpty())
            return -1;
    
        return app.exec();
    }
    
    

    main.qml

    import QtQuick 2.10
    import QtQuick.Window 2.10
    
    Window {
        visible: true
        width: 800
        height: 600
        title: qsTr("Hello World")
    
        Test {
            anchors.fill: parent;
        }
    }
    

    Test.qml

    import QtQuick 2.10
    
    TestForm {
    }
    

    TestForm.ui.qml

    import QtQuick 2.10
    
    Item {
        id: item1
        property alias item1: item1
        property alias mouseArea: mouseArea
        property alias shutdownButton: shutdownButton
        MouseArea {
            id: mouseArea
            anchors.fill: parent
    
            Rectangle {
                id: rectangle
                height: 60
                gradient: Gradient {
                    GradientStop {
                        position: 0
                        color: "#805bcce9"
                    }
    
                    GradientStop {
                        position: 0.99
                        color: "#80000000"
                    }
                }
                anchors.right: parent.right
                anchors.rightMargin: 0
                anchors.left: parent.left
                anchors.leftMargin: 0
                anchors.top: parent.top
                anchors.topMargin: 0
    
                Text {
                    id: text1
                    color: "#ffffff"
                    text: qsTr("Monday, 26-10-2015 3:14 PM")
                    verticalAlignment: Text.AlignVCenter
                    anchors.bottom: parent.bottom
                    anchors.bottomMargin: 0
                    anchors.top: parent.top
                    anchors.topMargin: 0
                    anchors.left: parent.left
                    anchors.leftMargin: 0
                    font.pixelSize: 12
                }
    
                MouseArea {
                    id: shutdownButton
                    x: 295
                    width: 50
                    anchors.bottom: parent.bottom
                    anchors.bottomMargin: 5
                    anchors.top: parent.top
                    anchors.topMargin: 5
                    transformOrigin: Item.Center
                    clip: false
                    visible: true
                    anchors.right: parent.right
                    anchors.rightMargin: 10
    
                    Rectangle {
                        id: rectangle1
                        color: "#27a9e3"
                        radius: 3
                        anchors.fill: parent
                        border.width: 1
                    }
                }
    
                MouseArea {
                    id: restartButton
                    x: 524
                    width: 50
                    height: 50
                    anchors.bottom: parent.bottom
                    anchors.bottomMargin: 5
                    anchors.top: parent.top
                    anchors.topMargin: 5
                    anchors.right: parent.right
                    anchors.rightMargin: 66
    
                    Rectangle {
                        id: rectangle2
                        color: "#27a9e3"
                        radius: 3
                        border.width: 1
                        anchors.fill: parent
                    }
                }
            }
        }
    
        Flickable {
            id: flickable
            x: -586
            y: -233
            width: 300
            height: 300
        }
    
        FocusScope {
            id: focusScope
            x: -558
            y: -247
            width: 100
            height: 100
        }
    }
    


  • @ambershark said in Is Qt Quick in Qt 5.10.1 stable?:

    @jronald Qt releases, If out of beta are stable typically.

    QML works fine for me. Especially a simple example like you stated. I have not tried it with 5.10.1 but I can't imagine a .1 would all of a sudden break everything. At least it hasn't in the 18 years I've used Qt. ;)

    If you are a C++ programmer like I'm assuming you are since you are using Qt, it can take some serious getting used to in order to do QML. QML is javascripty and it is quite the difference in how we are used to doing guis. I have a tough time with QML as well and definitely prefer Qt Widgets. That could just be experience and comfort level though. Not saying QML is bad, when I played with it for a demo app I did it was really quite cool.

    As for the future of Qt, I'm sure it will be just fine. It's the backbone of a lot of major projects like KDE. So even if Qt decided to close up shop there are plenty of developers that would take it over and continue to develop it. Myself included. So it won't be going away any time soon. Also it's been around for 20+ years.. I'm not worried about it's future at all.

    I've done a lot of cross platform work in C++ and there is definitely no better GUI toolkit than Qt. If some better alternative comes along then I would be worried about Qt, but as of now, nothing comes close.

    In my opinion, QML is not excellent enough, what I worried about is the team behind it. However Qt Widgets is good enough.
    Sometimes, I can't understand why things go that way. For example, pgAdmin 3 uses wxWidgets (no longer maintained), pgAdmin4 uses Python & Javascript, after some experiences I'm quite disappointed.


  • Moderators

    @jronald said in Is Qt Quick in Qt 5.10.1 stable?:

    In my opinion, QML is not excellent enough, what I worried about is the team behind it. However Qt Widgets is good enough.
    Sometimes, I can't understand why things go that way. For example, pgAdmin 3 uses wxWidgets (no longer maintained), pgAdmin4 uses Python & Javascript, after some experiences I'm quite disappointed.

    Yea I kind of feel the same way. I feel like QML is still not quite fully ready for production level code. It feels like it is new technology and then I find out it's been around for a long time.

    I will say that it does seem to get better and better but it's not something I would use for my primary desktop GUI unless I was going for a uniform look between a mobile app (which I would use QML) and a desktop one.

    Also thanks for sharing the code, I will give it a shot here in a little bit and let you know what I find out.


  • Qt Champions 2017

    I just wanted to give my $0.02 to this thread, and I have to admit that I know very little about QML.

    But: QML is not JavaScript! QML is a possibility to use QObjects in a very simple way (as declarative language) that allows very fast prototyping and requires litte programming knowledge. Also it is optimized for accelerated 3D graphics hardware (in contrast to QtWidgets).

    QML can be used with JavaScript; and it allows the programmer to choose if the business logic is programmed in C++, in JavaScript or in a mixture of both.

    Regards


  • Lifetime Qt Champion

    Tried on macOS with 5.10.0 and 5.10.1 and it's working.

    Can you show your .pro file ?


  • Moderators

    I tried it as well, and got this... is this what you were aiming for?
    0_1520804615963_qmlprob.png

    That was with 5.10.1.


  • Moderators

    @aha_1980 said in Is Qt Quick in Qt 5.10.1 stable?:

    I just wanted to give my $0.02 to this thread, and I have to admit that I know very little about QML.

    But: QML is not JavaScript! QML is a possibility to use QObjects in a very simple way (as declarative language) that allows very fast prototyping and requires litte programming knowledge. Also it is optimized for accelerated 3D graphics hardware (in contrast to QtWidgets).

    QML can be used with JavaScript; and it allows the programmer to choose if the business logic is programmed in C++, in JavaScript or in a mixture of both.

    Regards

    Yea when I said javascripty, I meant syntactically it was like js. Which it is. And you can definitely use pure JS in QML as well. I didn't mean to imply that QML was or is based on JS at all. JS syntax will be a lot harder for someone that is used to C++ which was all I was saying there. :)



  • @SGaist

    OS: Windows 10
    Qt: 5.10.1 (MSVC2017 x64)
    

    .pro

    QT += quick
    CONFIG += c++11
    
    # The following define makes your compiler emit warnings if you use
    # any feature of Qt which as been marked deprecated (the exact warnings
    # depend on your compiler). Please consult the documentation of the
    # deprecated API in order to know how to port your code away from it.
    DEFINES += QT_DEPRECATED_WARNINGS
    
    # You can also make your code fail to compile if you use deprecated APIs.
    # In order to do so, uncomment the following line.
    # You can also select to disable deprecated APIs only up to a certain version of Qt.
    #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
    
    SOURCES += main.cpp
    
    RESOURCES += qml.qrc
    
    # Additional import path used to resolve QML modules in Qt Creator's code model
    QML_IMPORT_PATH =
    
    # Additional import path used to resolve QML modules just for Qt Quick Designer
    QML_DESIGNER_IMPORT_PATH =
    
    # Default rules for deployment.
    qnx: target.path = /tmp/$${TARGET}/bin
    else: unix:!android: target.path = /opt/$${TARGET}/bin
    !isEmpty(target.path): INSTALLS += target
    


  • @ambershark said in Is Qt Quick in Qt 5.10.1 stable?:

    I tried it as well, and got this... is this what you were aiming for?

    Yes.

    OS: Windows 10
    Qt: 5.10.1 (MSVC2017 x64)
    


  • Maybe it is not the fault of QtQuick ->
    Please try environment QT_OPENGL=angle - there so many problems with the OpenGL driver on windows, yes even in 2018 maybe angle should be again the default (it was it for some versions) because there are so many issues with it.

    http://blog.qt.io/blog/2017/01/18/opengl-implementation-qt-quick-app-using-today/

    and even for QtCreator we are thinking about going back to the angle opengl wrapper:
    https://codereview.qt-project.org/#/c/223028/2//ALL,unified


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.