Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Is Qt Quick in Qt 5.10.1 stable?
Qt 6.12 LTS is out! See what's new in the release blog

Is Qt Quick in Qt 5.10.1 stable?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
13 Posts 5 Posters 5.3k Views 2 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.
  • jronaldJ jronald
    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.

    A Offline
    A Offline
    ambershark
    wrote on last edited by ambershark
    #3

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

    My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

    jronaldJ 1 Reply Last reply
    3
    • SGaistS SGaist

      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 ?

      jronaldJ Offline
      jronaldJ Offline
      jronald
      wrote on last edited by jronald
      #4

      @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
          }
      }
      
      1 Reply Last reply
      0
      • A ambershark

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

        jronaldJ Offline
        jronaldJ Offline
        jronald
        wrote on last edited by jronald
        #5

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

        A 1 Reply Last reply
        0
        • jronaldJ jronald

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

          A Offline
          A Offline
          ambershark
          wrote on last edited by ambershark
          #6

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

          My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

          1 Reply Last reply
          0
          • aha_1980A Offline
            aha_1980A Offline
            aha_1980
            Lifetime Qt Champion
            wrote on last edited by aha_1980
            #7

            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

            Qt has to stay free or it will die.

            A 1 Reply Last reply
            1
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #8

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

              Can you show your .pro file ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              jronaldJ 1 Reply Last reply
              2
              • A Offline
                A Offline
                ambershark
                wrote on last edited by
                #9

                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.

                My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

                jronaldJ 1 Reply Last reply
                1
                • aha_1980A aha_1980

                  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

                  A Offline
                  A Offline
                  ambershark
                  wrote on last edited by
                  #10

                  @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. :)

                  My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

                  1 Reply Last reply
                  0
                  • SGaistS SGaist

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

                    Can you show your .pro file ?

                    jronaldJ Offline
                    jronaldJ Offline
                    jronald
                    wrote on last edited by jronald
                    #11

                    @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
                    
                    1 Reply Last reply
                    0
                    • A ambershark

                      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.

                      jronaldJ Offline
                      jronaldJ Offline
                      jronald
                      wrote on last edited by jronald
                      #12

                      @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)
                      
                      1 Reply Last reply
                      0
                      • T Offline
                        T Offline
                        Tim.Jenssen
                        wrote on last edited by
                        #13

                        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

                        1 Reply Last reply
                        1

                        • Login

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