yuznumara
yuznumara

Reputation: 145

error use of undeclared identifier 'mainwindow' semantic issue in QtCreator

I just create new Qt Widgets Application. I open the mainwindow.cpp and it's like mainwindow.cpp doesnt see the "mainwindow.h" while i was on editor. But compiler works fine. How do i fix this semantic issues?

I added 'QT += widgets' to .pro file. It doesnt work.

These are actually default files.

--mainwindow.h--

mainwindow.h

--mainwindow.cpp--

mainwindow.cpp

Upvotes: 3

Views: 4678

Answers (1)

yuznumara
yuznumara

Reputation: 145

I fixed this bug by unchecking Help/Plugins/C++/ClangCodeModel and restart QtCreator.

Upvotes: 8

Related Questions