![]() Registered Member ![]()
|
I'm not sure which ui file to refer to. Mainwindow has a ui file, but dataModel is just a class containing functions without GUI elements. updateProjectData() is a function belonging to the dataModel class, but I can't get access to that function because I think I'm not passing the right pointer. Hence the error regarding QObject::updateProjectData(QTreeWidgetItem*) not existing.
I think it should be dataModel::updateProjectData(QTreeWidgetItem*) instead of QObject::updateProjectData(QTreeWidgetItem*).
Last edited by mensch on Wed Apr 15, 2009 9:49 pm, edited 1 time in total.
I have forced myself to contradict myself in order to avoid conforming to my own taste. Marcel Duchamp
|
![]() Administrator ![]()
|
Can you please post the full signature for the dataModel::updateProjectData function? Also, make sure the slot is declared public, by default they are private.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
Of course, datamodel.cpp
It's declared as a public slot in datamodel.h:
I have forced myself to contradict myself in order to avoid conforming to my own taste. Marcel Duchamp
|
![]() Administrator ![]()
|
Can you please add Q_OBJECT above "public:" in your header? Otherwise the Meta Object Compiler won't be run on your files.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
That makes sense, but I get two nasty errors when compiling:
Last edited by mensch on Thu Apr 16, 2009 5:19 am, edited 1 time in total.
I have forced myself to contradict myself in order to avoid conforming to my own taste. Marcel Duchamp
|
![]() Administrator ![]()
|
What are you using for your build system?
- If it is QMake, you may need to re run it ( qmake ) to regenerate the Makefile. - If it is CMake, could you please post CMakeLists.txt
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
I'm developing this in Xcode on OS X, so my guess I'm using neither at the moment. I ran qmake from the commandline which sorted things out. Everything builds now! Warnings about slots have also vanished, all because I didn't include the Q_OBJECT macro... :-$
Thanks again!
I have forced myself to contradict myself in order to avoid conforming to my own taste. Marcel Duchamp
|
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]