Error QApplication: no such file or directory

前端 未结 11 1816
挽巷
挽巷 2021-01-30 06:44

I have installed C++SDK that have Qt but when I try compiling a code linking QApplication it gives me the error:

Error QApplication: no such file or directory
         


        
11条回答
  •  深忆病人
    2021-01-30 07:01

    For QT 5

    Step1: .pro (in pro file, add these 2 lines)

    QT       += core gui
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    

    Step2: In main.cpp replace code:

    #include  
    

    with:

    #include 
    

提交回复
热议问题