
Originally Posted by
ViRuSTriNiTy
What kind of crash exactly? Do you get a stack strace, exception message or anything like that?
I've just found the cause of the problem. I did not guard against recursive calls to createExtension(). I've just done so however and I no longer get crashes, although I used a static variable like so
{
static bool extensionSheetIsInitialized = false;
if( !extensionSheetIsInitialized )
{
extensionSheetIsInitialized = true;
...
}
return 0;
}
QObject* CustomWidgetFactory::createExtension(QObject *object, const QString &iid, QObject* parent ) const
{
static bool extensionSheetIsInitialized = false;
if( !extensionSheetIsInitialized )
{
extensionSheetIsInitialized = true;
...
}
return 0;
}
To copy to clipboard, switch view to plain text mode
There is now the larger issue of how to proceed. How do I assign my indexes to my widget properties? So that I can control whether they are shown in the the properties editor? Ideally what I'd like to do is to display a subset of relevant properties of the widget depending on the value of a master property. For example, the master property could represent the shape of the wigdet while the remaining properties could include radius (for circles), length for squared etc, where the radius property is displayed only of the mater property is set to circle.
Bookmarks