Error when adding slot to QAction
-
When I attempt to add a slot to a QAction (Part of a menu) via the designer I'm getting an error that says "Error finding/adding slot" The class containing Ui::MainWindow cannot be found in MainWindow.h, MainWindow.cpp and a header I added at the very bottom it says please verify include directories, I'm not really sure what to make of this as it's included in the proper places any suggestions?
I solved it myself, it appears due to my inheritance of the ui_mainwindow i was getting the diamond inheritance issue :)
-
@Suroh6 said:
I solved it myself, it appears due to my inheritance of the ui_mainwindow i was getting the diamond inheritance issue :)
Multiple inheritance from
QObject
derived classes is not supported, but you shouldn't have that in the first place. Aside from that there's no problem with inheriting fromQObject
(directly or indirectly) and another class. In fact it's done as a standard way of providing interfaces for plugin implementations.