Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Strange problem with QMenu
Guest last edited by A Former User
In my main window header I have the following lines:
@ QMenu *viewMenu;
In my constructor I have:
@ viewMenu = menuBar()->addMenu("&View");
I get the following error message:
bq. ..\mainwindow.cpp:26: error: invalid use of incomplete type 'struct QMenuBar'
Am I doing something wrong?
Mr-Merlin last edited by
Have you missed out #include<QMenuBar> in the cpp?
Guest last edited by
Never mind I fixed the issue. Common logic suggested including QMainWindow should have been enough but I had to include QMenu and QMenuBar manually...
InnerLight last edited by
Thanks a lot, man! It's really fix the problem!
Pauly last edited by
This post is deleted!
"incomplete type " is a classic :)