Is it possible to access Qt Quick using c++?



  • I saw Qt Quick C++ classes,in the "Help" it says: "The Qt Quick module provides classes for embedding Qt Quick in Qt/C++ applications"
    I've read that page but I couldn't understand much,is it something that allow us to access Qt Quick using C++ (without using Qml)?Or is it possible with another method?


  • Moderators

    Hi,

    The help page is trying to say that you can embed QML code into your C++ code using "QQuickView":http://qt-project.org/doc/qt-5/qquickview.html

    You need to use QML to create Qt Quick apps.

    Is there a reason you want to avoid QML? I recommend trying it -- you will find that it is much more efficient for creating GUIs :)



  • Thanks for your answer.

    Yes,there is a reason for avoiding Qml. I am a C/C++ fanatic and when I see anything about Qml I get mad,really...


  • Moderators

    I see. There is no way to avoid QML if you want to use Qt Quick, I'm afraid.

    I've never properly spoken to someone who hates QML before, so I'd like to understand your thoughts better. Would you mind explaining why you get mad about it? (Is the language poorly-designed? Do you think it's unnecessary?)

    Also, what do you think about mixing SQL code in C++ code for database access?



  • Thanks for your answer.

    I hate Qml because Digia is promoting it highly and I think they are treating c++ like a step child.I don't want to use Qml (personal preference), but they talk like "it's the way to go" , so I think they will instead of making enhancements to c++ side,they will make enhancements to Qml side only , They may even turn Qt into a Qml(with the support of Javascript maybe) only framework in the future.

    So,cause I think they put the c++ side into second class and made the Qml first class,that's why I hate Qml.If the Digia would behave equally towards both of C++ and Qml,I would just use C++ without hating Qml...That's way I would see Qml as an option rather than an enforcement.


  • Moderators

    Thank you for sharing your thoughts. Recently a discussion started at http://comments.gmane.org/gmane.comp.lib.qt.devel/16522 about widgets vs. QML. Perhaps you'd like to join in? Subscribe to the "Development mailing list":http://lists.qt-project.org/mailman/listinfo/development and post a reply.

    Personally, I don't think we need to worry about C++ widgets being treated as 2nd-class. See "New Features in Qt 5.2":http://qt-project.org/wiki/New-Features-in-Qt-5.2 -- there were many new features added to Qt Widgets in the latest version. People are still enhancing C++ widgets.


Log in to reply
 

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