I recently started to study qt4, bought a book "proficient in qt4 programming", installed qt4 and kdevelop on my Ubuntu, and wrote it manually in the command line.Code. There is no error during compilation and it can be run successfully. However, after a qt4 project is created in kdevelop, compilation fails. the following error is reported at the link: Undefined reference to 'qapplication:: qapplication (Int &, char **, INT )'.
This is obviously because no database location is specified, and the corresponding class cannot be found during the link. After a long time of exploration, I finally found the answer on the kdevelop official website. In fact, it is very simple. First, check whether your project specified the use of qt4 instead of qt3. in project-> project options:
Click qmake manager on the right side:
Right-click the src directory, select subproject settings, and click the configuration tab:
Select the GUI library to be included. Now I can learn qt4 at ease ~~