55#include < QLabel>
66#include < QDebug>
77
8- HelloQt::HelloQt (QWidget *parent) : QWidget(parent) {
8+ HelloQt::HelloQt (QWidget *parent) : QWidget(parent)
9+ {
910 // The memory management is not done explicitly but by using the parent
1011 // relationship built into Qt
1112 // The tr calls are not strictly neccesary, but it is all that is needed for
@@ -31,17 +32,18 @@ HelloQt::HelloQt(QWidget *parent) : QWidget(parent) {
3132 // match
3233 connect (pushButton, &QPushButton::clicked, this , &HelloQt::writeToDebug);
3334 // Lambdas can also be used as can ordinary freestanding functions
34- connect (directButton, &QPushButton::clicked,
35- []() { qDebug () << tr (" I am in line" ); });
35+ connect (directButton, &QPushButton::clicked, []() { qDebug () << tr (" I am in line" ); });
3636 // Most usefull signals and slots are already built into the framework.
37- connect (fatal, &QPushButton::clicked, this , &HelloQt::close); // could just use close
37+ connect (fatal, &QPushButton::clicked, this , &HelloQt::close);// could just use close
3838};
3939
40- HelloQt::~HelloQt () {
40+ HelloQt::~HelloQt ()
41+ {
4142 // Nothing to do here, the parent system makes sure that all the elements that
4243 // are parented to this is cleaned up
4344}
4445
45- void HelloQt::writeToDebug (void ) {
46+ void HelloQt::writeToDebug (void )
47+ {
4648 qDebug () << tr (" I don't know what I was supposed to debug here..." );
4749}
0 commit comments