KDAB / GammaRay

GammaRay is a tool to poke around in a Qt-application and also to manipulate the application to some extent.
https://www.kdab.com/gammaray
Other
1.6k stars 282 forks source link

Model problem with delegate #1004

Closed Guitronic closed 2 months ago

Guitronic commented 2 months ago

If we use the ObjectBroker::model("com.kdab.GammaRay.ObjectInspector.properties") model, if we look for the value of a field that uses a delegate to display a checkBox, we receive an invalid QModelIndex.

Waqar144 commented 2 months ago

what are you trying to do? Please post full details with full steps to reproduce the issue, ideally with a minimal reproducible example

Guitronic commented 2 months ago

I found an acceptable solution, you have to use the Qt::EditRole role. For example with the QPushButton avec 'text 'property: