Changes in C++ classes
In this recipe, we will learn what the changes in Qt6’s C++ classes are.
How to do it…
Follow these steps to learn about C++ classes in Qt6:
- Create a new Qt Console Application by going to File | New Project.
- We will open up the
main.cpp
file and add the following headers:#include <QCoreApplication> #include <QDebug> #include <QLinkedList> #include <QRegExp> #include <QStringView> #include <QTextCodec> #include <QTextEncoder> #include <QTextDecoder>
- After that, add the following code for demonstrating the
QLinkedList
class:int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); // QLinkedList QLinkedList<QString> list; list << "string1" << "string2" << "string3"; QLinkedList<QString>::iterator...