dmatetelki / qtmindmap

mindmap software in Qt
22 stars 12 forks source link

src/main.cpp:16:18: error: variable has incomplete type 'QApplication' #1

Open w5688414 opened 5 years ago

w5688414 commented 5 years ago

when i use make command, the error occurs: src/main.cpp:16:18: error: variable has incomplete type 'QApplication' QApplication a(argc, argv); ^ /anaconda/include/qt/QtCore/qobject.h:453:18: note: forward declaration of 'QApplication' friend class QApplication; ^ src/main.cpp:45:13: error: use of undeclared identifier 'QMessageBox' QMessageBox::critical(0, ^ src/main.cpp:50:9: error: incomplete type 'QApplication' named in nested name specifier QApplication::setQuitOnLastWindowClosed(false); ^~~~~~~~~~~~~~ /anaconda/include/qt/QtCore/qobject.h:453:18: note: forward declaration of 'QApplication' friend class QApplication; ^ 3 errors generated. make: *** [main.o] Error 1

dmatetelki commented 5 years ago

@w5688414 : I wrote this with Qt4 and still have no problem compiling it with Qt4.

Do you have Qt5? Maybe some coding/include guidelines have changed.

Try my RP branch : https://github.com/dmatetelki/qtmindmap/tree/pr_issue_1 and if it fixes it, i'll merge it.

I've included QApplication there.

w5688414 commented 5 years ago

`#include

include ` need to add QMessageBox as well.

it can run normally, but I can't draw, all operations don't work