I think he wants to edit the list of properties that a specific state sets.
A quick look into QState.cpp reveals, that the list of properties to be set is stored in the private object. As far as I can see, there are no other access-members to d->propertyAssignments.
void QState
::assignProperty(QObject *object,
const char *name,
{
Q_D(QState);
if (!object) {
qWarning("QState::assignProperty: cannot assign property '%s' of null object", name);
return;
}
for (int i = 0; i < d->propertyAssignments.size(); ++i) {
QPropertyAssignment &assn = d->propertyAssignments[i];
if ((assn.object == object) && (assn.propertyName == name)) {
assn.value = value;
return;
}
}
d->propertyAssignments.append(QPropertyAssignment(object, name, value));
}
void QState::assignProperty(QObject *object, const char *name,
const QVariant &value)
{
Q_D(QState);
if (!object) {
qWarning("QState::assignProperty: cannot assign property '%s' of null object", name);
return;
}
for (int i = 0; i < d->propertyAssignments.size(); ++i) {
QPropertyAssignment &assn = d->propertyAssignments[i];
if ((assn.object == object) && (assn.propertyName == name)) {
assn.value = value;
return;
}
}
d->propertyAssignments.append(QPropertyAssignment(object, name, value));
}
To copy to clipboard, switch view to plain text mode
Why don't you create a new state and replace the old one instead of trying to change it?
Johannes
Bookmarks