N
N
Nikolay L2018-11-05 17:15:36
linux
Nikolay L, 2018-11-05 17:15:36

How to fix "QApplication: No such file or directory" error?

When compiling a file in qmake, such an error takes off.
5be04f0e5046b892574919.png
The code:

#include <QApplication>
#include <QTextEdit>

int main(int argv, char **args)
{
    QApplication app(argv, args);

    QTextEdit textEdit;
    textEdit.show();

    return app.exec();
}

Qmake installed via "sudo apt-get install qt5-qmake"
When compiling any Qt projects, errors come out:
QWidget - No such file or directory
QApplication - No such file or directory
and similar.
What to do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Gerasimov, 2018-11-05
@kolyaL

On my machine, QApplication is in a QtWidgets subdirectory that you don't have in your path.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question