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.63k stars 283 forks source link

Model problem with delegate #1004

Closed Guitronic closed 4 months ago

Guitronic commented 4 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 4 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 4 months ago

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