Announcement

Collapse
No announcement yet.

Qt 5.0 Beta Not Here Due To Difficulties

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Originally posted by NeoBrain View Post
    How is that QML-only? It's exposing existing, non-QML functionality to QML
    QML qt5 is using oxygen widgets for Qt4 fine.
    C++ in Qt5 is not.

    At least this is what I gather from reading RealNC's posts.

    Comment


    • #17
      Originally posted by RealNC View Post
      I was just searching, and stumbled across this:

      http://labs.qt.nokia.com/2012/06/06/...ents-for-qt-5/

      But why on earth did they make a QML-only thing? :-/ Desktop apps use widgets, not QML.
      Because the ever-changing owners of Qt add new directions. Off course the so called Qt community see these changes as new blessings. Now QML is less a focus but maybe this will change again in a few years when Qt is sold yet again. Who know ans who cares?

      Comment


      • #18
        Originally posted by ShadowBane View Post
        So, earlier in the thread there was discussion about how Oxygen wasn't available for Qt5, yet there it is in the screenshot...

        Also, QML is supposed to make it easier to create UIs. I haven't tried it but from what I have heard it is pretty nice. They are still working out some of the bugs, but KDE is adopting QML for a lot of Plasma. So far it has made things look good and function smoothly.
        For traditional GUIs, nothing beats widgets and you can keep using C++. For eye candy (like Plasma) QML makes sense. But having to use JavaScript in your C++ code is a bitch. It's quite a deal breaker.

        Comment


        • #19
          Originally posted by RealNC View Post
          For traditional GUIs, nothing beats widgets and you can keep using C++. For eye candy (like Plasma) QML makes sense. But having to use JavaScript in your C++ code is a bitch. It's quite a deal breaker.
          You don't have to use javascript... The GUI is done using a markup language and the code can be in C++.

          Comment


          • #20
            Originally posted by funkSTAR View Post
            Because the ever-changing owners of Qt add new directions. Off course the so called Qt community see these changes as new blessings. Now QML is less a focus but maybe this will change again in a few years when Qt is sold yet again. Who know ans who cares?
            Will there ever be a Qt thread without your trolling?
            They added functionality that was available to C++ but not QML, and made it available to QML. It was a requested and useful feature.
            Also all of this was before the Nokia sell of to Digia.
            Ever changing owners? Qt has been around for 20+ years. In 2008 they got bought by Nokia, and 4 years later they are bought by Digia. 2 owner changes 4 years apart in 20 years is not ever changing.

            Get out of that basement of yours.

            Comment


            • #21
              Originally posted by ShadowBane View Post
              You don't have to use javascript... The GUI is done using a markup language and the code can be in C++.
              Not sure what you're talking about. The only way to access the QML stuff is... QML. You can't get to it through C++.

              Look at http://labs.qt.nokia.com/2012/08/08/...-text-in-qml-2 for example:

              Code:
              Text {
                  text: "Some text"
                  renderType: Text.NativeRendering
              }
              renderType? What is that? How do I set it to "Text.NativeRendering" through C++?

              Comment


              • #22
                Originally posted by RealNC View Post
                Not sure what you're talking about. The only way to access the QML stuff is... QML. You can't get to it through C++.

                Look at http://labs.qt.nokia.com/2012/08/08/...-text-in-qml-2 for example:

                Code:
                Text {
                    text: "Some text"
                    renderType: Text.NativeRendering
                }
                renderType? What is that? How do I set it to "Text.NativeRendering" through C++?
                http://qt-project.org/doc/qt-4.8/qtb...ing-qml-with-c

                there you go, have a read.

                Comment


                • #23
                  Originally posted by GabrielYYZ View Post
                  Thanks, but that just for loading QML files. You can't replace the *.qml file with C++ code. How do you write this:

                  Code:
                   import QtQuick 1.0
                  
                   Item {
                       width: 100; height: 100
                  
                       Rectangle {
                           anchors.fill: parent
                           objectName: "rect"
                       }
                   }
                  in C++?

                  Comment


                  • #24
                    Originally posted by RealNC View Post
                    Thanks, but that just for loading QML files. You can't replace the *.qml file with C++ code. How do you write this:

                    Code:
                     import QtQuick 1.0
                    
                     Item {
                         width: 100; height: 100
                    
                         Rectangle {
                             anchors.fill: parent
                             objectName: "rect"
                         }
                     }
                    in C++?
                    Code:
                    #include <QtGui/QMainWindow>
                    #include <QtGui/QWidget>
                    
                    QMainWindow *window = new QMainWindow;
                    window->setMinimumSize(100, 100);
                    
                    QWidget *rectangle = new QWidget(window);
                    item->setObjectName("rect");
                    
                    window->setCentralWidget(rectangle);
                    I guess that would be one way. There are errors in there and i left out a lot of boilerplate (so that won't compile) but it's the same idea, i think.

                    ps: that anchors.fill property i think is covered by layout contained in a QMainWindow central widget area. i don't really know much QML, so that's just an educated guess.
                    Last edited by GabrielYYZ; 08-17-2012, 05:42 PM.

                    Comment


                    • #25
                      2 things for clarification

                      1.) the theme on screenshot is NOT GTK is QT internal Theme plastic which is in every version of QT since 2.x and is selectable using qtconfig

                      1.a) Oxygen is part of KDE not QT and since the ABI changed is perfectly normal it doesnt load but it will be ported once KDE5 starts[i think is WIP now]

                      1.b) The font issue is probably an antialiasing setting since normally you set it from KDE or the render backend used, i guess we have to wait until KDE5 reach alpha 1

                      2.) QML uses scenegraph and yes is JS and it has some feature the C++ codepath miss but you still can write your app 100% in C++ or in mixed mode [QML gui / logic C++], so for now QML is like QtScript was an AddOn that provide some goodies and i very likely due to pressure that scenegraph will become available for C++ API in a subsequent revision but is not like Qt is 100% javascript now or anything like it

                      Comment


                      • #26
                        Originally posted by GabrielYYZ View Post
                        Code:
                        #include <QtGui/QMainWindow>
                        #include <QtGui/QWidget>
                        
                        QMainWindow *window = new QMainWindow;
                        window->setMinimumSize(100, 100);
                        
                        QWidget *rectangle = new QWidget(window);
                        item->setObjectName("rect");
                        
                        window->setCentralWidget(rectangle);
                        I guess that would be one way. There are errors in there and i left out a lot of boilerplate (so that won't compile) but it's the same idea, i think.

                        ps: that anchors.fill property i think is covered by layout contained in a QMainWindow central widget area. i don't really know much QML, so that's just an educated guess.
                        Qt Quick doesn't use QWidget-derived classes. It's a completely new GUI implementation. And you can't use that new implementation from C++. It's a QML-exclusive. Only QML gets to access it. And I find that sad.

                        So the code you posted has nothing to do with the QML code. Not even at the lowest level; different code is used for Qt Quick.

                        Comment


                        • #27
                          Originally posted by RealNC View Post
                          Thanks, but that just for loading QML files. You can't replace the *.qml file with C++ code. How do you write this:

                          Code:
                           import QtQuick 1.0
                          
                           Item {
                               width: 100; height: 100
                          
                               Rectangle {
                                   anchors.fill: parent
                                   objectName: "rect"
                               }
                           }
                          in C++?
                          You don't. The idea is that you use QML for the same things you would use a Qt Designer form for, except that you have greater control over the QML than you would with the visual designer.

                          Comment


                          • #28
                            Originally posted by RealNC View Post
                            Qt Quick doesn't use QWidget-derived classes. It's a completely new GUI implementation. And you can't use that new implementation from C++. It's a QML-exclusive. Only QML gets to access it. And I find that sad.

                            So the code you posted has nothing to do with the QML code. Not even at the lowest level; different code is used for Qt Quick.
                            I think it was said in a Blog, they want you to do the UI code in QML and logic in C++.
                            Anyways, QML uses it's own widgets like you said, so Qwidget will still be the preferred way of doing desktop applications as only it uses the native style. The QML desktop components won't make it until Qt 5.1 (from what I have heard, could be wrong here).

                            Comment


                            • #29
                              Originally posted by ShadowBane View Post
                              You don't. The idea is that you use QML for the same things you would use a Qt Designer form for, except that you have greater control over the QML than you would with the visual designer.
                              I don't see how this relates to not being able to do the same in C++.

                              Comment


                              • #30
                                Originally posted by RealNC View Post
                                Qt Quick doesn't use QWidget-derived classes. It's a completely new GUI implementation. And you can't use that new implementation from C++. It's a QML-exclusive. Only QML gets to access it. And I find that sad.

                                So the code you posted has nothing to do with the QML code. Not even at the lowest level; different code is used for Qt Quick.
                                I don't really get what you're saying or what you're sad about...

                                I agree that Qt Quick doesn't use QWidget-derived classes and that it's a completely new way to do GUI but you can use it from C++ (see QDeclarativeEngine). The code i posted is not how you would interface with QML, it's just a way to do that QML thing using C++ widgets. To use QML objects from c++, the link i posted explains how to do it.

                                Comment

                                Working...
                                X