D
D
Denis2021-07-11 13:45:04
Qt
Denis, 2021-07-11 13:45:04

QT C++ Why is the code so different?

Why is C++ code different from qt code?
To output Hello world! in c++ you need : cout << "Hello world!" <<endl;
And in Qt (we will assume that this is written in the button function): qDebug() << "Hello world!";
And in general, is qt a separate programming language (If so, where is the best place to read about it)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly, 2021-07-11
@NeYmen

Why is C++ code different from qt code?

The question was originally formulated incorrectly. It should have been written "from code written using Qt". In your opinion, there are visual differences, but this is because Qt provides its own APIs.
To output Hello world! in c++ you need : cout << "Hello world!" <<endl;
And in Qt (we will assume that this is written in the button function): qDebug() << "Hello world!";

The cout option will work exactly the same.
And in general, is qt a separate programming language (If so, where is the best place to read about it)?

No, Qt is not a separate programming language, but a set of libraries or a framework (depending on how you use it) + a set of tools.
However, for UI development, Qt can use a separate language called QML. But you may not use it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question