Hi,

so, I've created a widget called DisclosureGroupBox, which is a subclass of QWidget. Part of a DisclosureGroupBox is another widget called DisclosureBar, which is a subclass of QAbstractButton.
I've also created QDesignerCustomWidgetInterfaces for both widgets. As DisclosureGroupBox isn't supposed to be used on it's own, its interface's domXml() returns an empty string.

Both widgets have properties which I want to be editable in QtDesigner's property editor.
Now, what is the best way to show the properties of DisclosureBar for DisclosureGroupBox objects in the QtDesigner?
If I don't do anything, the property editor only shows DisclosureGroupBox's properties. So I've created a QDesignerPropertySheetExtension and managed to get it to show all the QObject and QWidget properties along with the DisclosureGroupBox properties, and by creating a fake property group for the DisclosureBar properties I was able to show those properties, too.

The first problem is, that the way I create the QObject and QWidget property groups just seems wrong, see here:
Qt Code:
  1. QString LPropertySheetExtension::propertyGroup(int index) const
  2. {
  3. QString ret;
  4. if (additionalProperties.contains(index)) {
  5. ret = additionalProperties.value(index).className;
  6. } else {
  7. QMetaObject metaObject = *pluginObject->metaObject();
  8. forever {
  9. if (metaObject.propertyOffset() <= index && index < metaObject.propertyCount()) {
  10. ret = metaObject.className();
  11. break;
  12. }
  13. if (metaObject.superClass() == NULL) {
  14. break;
  15. } else {
  16. metaObject = *metaObject.superClass();
  17. }
  18. }
  19. }
  20. if (ret.isEmpty()) {
  21. qWarning("No property group found for property: index %d", index);
  22. }
  23. return ret;
  24. }
To copy to clipboard, switch view to plain text mode 

There has to be a better way.

And the second, and more severe, problem is, that all the DisclosureBar properties that are changed via the property editor aren't set. They are lost when showing a preview, see attachment, when saving the form, and in the compiled program.
disclosure.jpg

So, again my question: What is the best way to show the properties of DisclosureBar for DisclosureGroupBox objects in the QtDesigner?

Thanks