Re: Need help making plugin
Try including "clientNotebook.h" in clientNotebookPlugin.cpp.
Re: Need help making plugin
Now that I've inserted the plugin into a form, it doesn't compile:
In file included from mainmenu.h:19,
from main.cpp:16:
ui_mainmenu.h:36:34: error: clientNotebookPlugin.h: No such file or directory
In file included from mainmenu.h:20,
from main.cpp:16:
clientNotebookPlugin/clientNotebookPlugin.h:4:42: error: QDesignerCustomWidgetInterface: No such file or directory
Why is ui_mainmenu.h not resolving ?
Doesn't Qt look in the plugin dir for it ?
Do I need to set something in .pro file ?
Re: Need help making plugin
Quote:
Originally Posted by
vieraci
ui_mainmenu.h:36:34: error: clientNotebookPlugin.h: No such file or directory
Does ClientNotebookPlugin::includeFile() return "clientNotebookPlugin.h"? If so, make it return "clientNotebook.h" (or whatever is the correct file name).
Quote:
clientNotebookPlugin/clientNotebookPlugin.h:4:42: error: QDesignerCustomWidgetInterface: No such file or directory
Try adding "CONFIG += designer" to the .pro file (and re-generating the vs project).
Re: Need help making plugin
Quote:
Originally Posted by
jpn
Does ClientNotebookPlugin::includeFile() return "clientNotebookPlugin.h"? If so, make it return "clientNotebook.h" (or whatever is the correct file name).
YES ! ok, fixed, rebuilt plugin, cleaned project, rebuilt...but now:
In file included from mainmenu.h:19,
from main.cpp:8:
ui_mainmenu.h:36:28: error: clientNotebook.h: No such file or directory
Quote:
Originally Posted by
jpn
Try adding "CONFIG += designer" to the .pro file (and re-generating the vs project).
No difference.
Re: Need help making plugin
The plugin is just for using clientNotebook in designer. You still need to include clientNotebook to you project.
Re: Need help making plugin
Thanks again, that should have been obvious to me.
Now I'm receiving yet ANOTHER undefined reference...
mainmenu.o: In function `Ui_MainMenu::setupUi(QMainWindow*)':
mainmenu.cpp:(.text._ZN11Ui_MainMenu7setupUiEP11QM ainWindow[Ui_MainMenu::setupUi(QMainWindow*)]+0x2094): undefined reference to `ClientNotebook::ClientNotebook(QWidget*)'
mainmenu.cpp:(.text._ZN11Ui_MainMenu7setupUiEP11QM ainWindow[Ui_MainMenu::setupUi(QMainWindow*)]+0x296d): undefined reference to `ClientNotebook::ClientNotebook(QWidget*)'
collect2: ld returned 1 exit status
Sorry, I've spent hours over this but I can't work out why. I wish I had more knowledge :-(
I tried placing the cpp and .o files in the same directory but it didn''t help.
Re: Need help making plugin
Did you add clientNotebook.h and clientNotebook.cpp to the application's .pro file?
Re: Need help making plugin
ok, added them, new error message:
clientNotebook.o: In function `ClientNotebook::ClientNotebook(QWidget*)':
clientNotebook.cpp:(.text+0x31): undefined reference to `vtable for ClientNotebook'
clientNotebook.cpp:(.text+0x38): undefined reference to `vtable for ClientNotebook'
clientNotebook.o: In function `ClientNotebook::ClientNotebook(QWidget*)':
clientNotebook.cpp:(.text+0xb1): undefined reference to `vtable for ClientNotebook'
clientNotebook.cpp:(.text+0xb8): undefined reference to `vtable for ClientNotebook'
Am using 2
clientNotebook widgets in mainMenu, hence error message twice.
Re: Need help making plugin
Did you remember to re-run qmake or did you just add the file through an IDE or so?
Re: Need help making plugin
That was it !!
I mistakenly put the header file listed in SOURCES instead of HEADERS...
SOURCES = main.cpp \
mainmenu.cpp \
clientNotebook/clientNotebook.cpp \
clientNotebook/clientNotebook.h
Thank you very much. :-)