qdebug 1



qDebug() << "debug message" << Qt::endl;

Here is what the above code is Doing:
1. We import the QtCore module.
2. We import the QtGui module.
3. We import the QtWidgets module.
4. We import the Qt module.
5. We create a QApplication object.
6. We create a QPushButton object.
7. We set the text of the button to "Quit".
8. We connect the clicked signal of the button to the quit slot of the QApplication object.
9. We show the button.
10. We execute the application.

Similar Posts