Problem with sample program
-
Hello,
I just learn C++ and I read a book about it.
Now, I am at the chapter about QT and this sample doesn't work:´´´
#include <QtWidgets/QApplication>
#include <QtWidgets/QLabel>
#include <iostream>class MeinLabel : public QLabel
{
public:
MeinLabel(const char *text) : QLabel(text)
{
}~MeinLabel() { std::cout << "Destruktor ~MeinLabel gerufen!" << std::endl; }
};
int main(int argc, char *argv[])
{
QApplication application(argc, argv);
MeinLabel *mlabel = new MeinLabel("Erstes Qt-Programm");
mlabel->show();delete mlabel; return application.exec();
}
´´´Why?
QT Creator show me 59 errors.
Sorry for my bad english.