Announcement

Collapse
No announcement yet.

Qt 5.0 Beta Not Here Due To Difficulties

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

  • #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 GabrielYYZ
      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


      • #23
        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


        • #24
          Originally posted by GabrielYYZ
          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


          • #25
            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


            • #26
              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


              • #27
                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


                • #28
                  We're doing circles.

                  You cannot use C++ to do all the new stuff (animations, transitions, transformations, etc.) You HAVE to use QML. I don't like to write in QML. It's awful, like with many other languages where strict compiler checking has been thrown down the toilet. If I wanted that, I would write in Python or something and use its Qt bindings.

                  It's like putting away with C in Gtk and tell everyone to use VisalBasic or something. Because that's what happened here.

                  Comment


                  • #29
                    And btw, I'm not alone in this. In a poll that was posted:

                    http://qt-project.org/forums/viewthread/16693/

                    Nobody cared for any features other than Desktop integration and a C++ API. Many people, no matter how feature rich Qt Quick gets, consider it a PITA unless you can use it from C++.

                    Comment


                    • #30
                      Originally posted by RealNC View Post
                      We're doing circles.

                      You cannot use C++ to do all the new stuff (animations, transitions, transformations, etc.) You HAVE to use QML. I don't like to write in QML. It's awful, like with many other languages where strict compiler checking has been thrown down the toilet. If I wanted that, I would write in Python or something and use its Qt bindings.

                      It's like putting away with C in Gtk and tell everyone to use VisalBasic or something. Because that's what happened here.
                      Oh no, they added a declaritive way of doing UIs. Unfortunately doing declaritive programming in an imparitive language (C++) doesn't work that well.. I am pretty sure that they have C++ stuff in the works, but it may or not be there for 5.0. Declaritve programming is very good for for UIs though, no reason to complain about it.

                      Comment

                      Working...
                      X