Important: Please read the Qt Code of Conduct -

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
    MeinLabel(const char *text) : QLabel(text)

        std::cout << "Destruktor ~MeinLabel gerufen!" << std::endl;


    int main(int argc, char *argv[])
    QApplication application(argc, argv);
    MeinLabel *mlabel = new MeinLabel("Erstes Qt-Programm");

    delete mlabel;
    return application.exec();



    QT Creator show me 59 errors.

    Sorry for my bad english.

  • @Gravak


    The errors Qt creators shows are from your C++ compiler. The errors contain useful information about what is not working. You need to post those errors here before anyone can help you.



  • Problem solved.

    The Qt Project file was empty.

Log in to reply