W
W
Wolf56782019-08-25 18:15:31
Qt
Wolf5678, 2019-08-25 18:15:31

What is the difference between main.cpp and mainwindow.cpp, main.h and mainwindow.h?

I recently started learning Qt and this question arose. When creating a project, not only main.cpp appears, but also mainwindow.cpp and mainwindow.h, what are they for?
PS If it doesn't bother you, then answer one more question: why do we need a pro-file, which is also generated when creating a project?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
egorggegor, 2019-08-25
@Wolf5678

main.cpp is the main file where your application is launched,
mainwindow.cpp is where the methods of the class that is in mainwindow.h are implemented
. td

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question