Strange Error message
-
Tried that but still no change...
Thanks for taking a lookmy code:
https://www.dropbox.com/sh/qkujdbs0trjksvq/AADEV3y0xMyQ__WyP6IkzLOha?dl=0
-
Hi,
You can't copy QObject derived class so addToList should have a pointer to staff as parameter
-
Is this code located in a function ?
-
You can't write code freely anywhere in a file in C/C++ It needs to be inside a function/method.
-
Thanks I moved it into a function. now i'm getting an error invalid conversion from int to char* in the following function @QString staff::toString() {
return QString("Name: %1 \n Birth Date: %2 \n Staff Type: %3 \n \n").arg(s_name).arg(s_birthDate.toString('yyyyMMdd').arg(getTypeString()));
}@there's no int in this function though? Could it be the enum s_type? I created a function getTypeString @
staff::getTypeString() {
return property("Type").toString();
}
that's supposed to return a QString... -
The only error I see currently is that you have a misplace arg. You attached your third parameter to the s_birthDate.toString call
-
Nop, that part is fine
-
@
QString("Name: %1 \n Birth Date: %2 \n Staff Type: %3 \n \n")
.arg(s_name) << correct
.arg(s_birthDate.toString('yyyyMMdd').arg(getTypeString() << arg of toString rather than arg for QString()
@