Is it worth learning both qt quick and qt widgets ?
-
-
It really depends on your goal. Do you want to learn how to program in C/C++ and Qt is a part of that goal or do you simply want to learn Qt and the programming language is secondary. That might be the difference between QtQuick and QtWidgets.
Some of those 'Beginner C++' are not worth the paper they are printed on. The worst are usually the ones with a title something like 'Learn to Program <name> in 24 hrs'. If you are interested in learning to program C++ one book I would recommend is this: "The C++ Programming Language":http://www.stroustrup.com/4th.html I particularly liked the first part that describe variables, operators, and the other foundation parts of the language which most other books just gloss over. I have read my copy several times.
-
[quote author="Rondog" date="1423252208"]
Some of those 'Beginner C++' are not worth the paper they are printed on. The worst are usually the ones with a title something like 'Learn to Program <name> in 24 hrs'.
[/quote]
However, it is not a problem of c++ but programmers.
When you work with those programmers, you always suffer from their products.
global variable, super long functions/classes, magic numbers, copy and paste, wrong data structures, inefficient algorithms, awkward function names(a1, a2, a3 etc) and so on. You can find many anti-patterns from their codes.
Whenever they finish their half-done project, you need to spend your times to fix and refactor their codes because they do not know what are they doing about and running out of times(PM assign them new projects) if your PM is an idiot. What is the meaning of asking them to codes if they cannot finish the projects properly but always ask other to fix their half-done jobs?
The worst thing is, they do not mind the quality of their codes, they only want to keep their jobs to pay the bills until they retire, so they hardly improve.
-
Hi,
Qt Quick uses the "QML language":http://doc.qt.io/qt-5/qmlapplications.html instead of C++. So if your goal is learning C++, stick to Qt Widgets.
See "Getting Started with Qt Widgets":http://doc.qt.io/qt-5/gettingstartedqt.html
-
However, it is not a problem of c++ but programmers. ...
That was at least not informative and I doubt helps us all to have a good time here as suggested in posting rules.
I want to learn c++ and qt is a part of it . programming language is not secondary. And my main aim is to build desktop applications.
Qt is not part of C++. It is an opposite. And the most significant unrelated to C++ part in Qt is Qt Quick. When every other component in so called Qt widgets can be a good example of well designed C++ classes ( well with some extension of C++ which require special pre-processing for implementation of signal/slots mechanics ).
So if you study C++ leave Qt Quick for time you are fluent with C++ unless you really want to make some fancy (read uncommon at least for desktops) targeting mostly always portable devices.
My opinion is that success in using Qt Quick is defined by professional level of graphics designer.
So spending time on learning it when learning C++ would not be productive.
Hope this was helpfulRegards,
Alex -
Thanks for replying .
I have another question . Correct me if I am wrong . I have read on many forums that Qt versions which are released after 4.6 are mainly focused on Qt quick and qml and not on Qt widgets because widgets have attained stability . Is that true ? If it is then then the books "C++ GUI Programming with Qt 4, Second Edition " and "Advanced Qt programming by Mark Summerfield " which focus on Qt 4.3 and 4.6 respectively are not outdated if I want to learn only about Qt widgets and not about Qt quick . So, should I read those books ? -
[quote author="ayushexel" date="1423318849"] I have read on many forums that Qt versions which are released after 4.6 are mainly focused on Qt quick and qml and not on Qt widgets because widgets have attained stability . [/quote]
As far as I know, this is true, QWidget almost cease to add new features.
[quote author="ayushexel" date="1423318849"]So, should I read those books ? [/quote]
Yes, you should, the QWidget of Qt5 and Qt4 are very similar to each other, the books you mention about are very good for learning Qt5(except of the part of QML).Oh, forgot to say, stick to QRegularExpression, forget about QRegExp.I do not know your experiences, but I would suggest you try to make yourself familiar with one of the language first, either c++ or qml/javascript. If you want to learn c++, stick with QWidget.
The c++ programming language is a good book, but if you find it hard to digest(this book is for experience programmer), you could try another one("good c++ books":http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list)
After you familiar with c++, I would suggest you read a programmer bible which called "code complete 2".
If you want to know more about c++, and keep your information up to date, you can google "standard c++", there are tons of useful data you can find. Hope these help you
-
You can design fluently, highly customize UI by QML
But there are three drawbacks you need to consider1 : You need more dll, this is not a big deal on desktop, but low end mobile or embedded platform is another story
2 : You need openGLES2.0, not all of the clients want to upgrade their pc/softwares, so qml may not perform well on those old machines(commercial version of Qt solve this problem)
3 : The components of qml are not as rich as QWidget yet, but you can expand them by c++ or mixed the QWidget with qml.
-
[quote author="ayushexel" date="1423318849"]Thanks for replying .
I have another question . Correct me if I am wrong . I have read on many forums that Qt versions which are released after 4.6 are mainly focused on Qt quick and qml and not on Qt widgets because widgets have attained stability . Is that true ? If it is then then the books "C++ GUI Programming with Qt 4, Second Edition " and "Advanced Qt programming by Mark Summerfield " which focus on Qt 4.3 and 4.6 respectively are not outdated if I want to learn only about Qt widgets and not about Qt quick . So, should I read those books ? [/quote]I've been using Qt since version 3.? to the latest 5.4.0 I haven't skipped too many versions between - I love this software. I have heard about the QtQuick option but I have never looked at it as this is just another facet of this software (something I haven't needed to look at yet). I also don't bother with the UI files (I do use the Designer to 'test' ideas for layout but not much else). My point is I don't notice the software has changed to solely focus on QtQuick or QML (whatever that is).
If you want to learn C++ stick to the widgets. There are a few extensions to C++ which can be a little distracting (Q_OBJECT, signals:, slots:, moc compiler, ...) but overall they are minor. The other methods are intended to produce programs faster (hence QtQuick) but they do hide a lot of the details.