[Interest] Where to catch exception when a qml plugin is loaded? Even possible?
wargand at gmx.de
wargand at gmx.de
Wed Apr 25 21:19:45 CEST 2012
Hi,
I have a QDeclarativeExtensionPlugin, which registers a class ImageModel
to be used as model in QML. Works fine (see snippet below).
Now I am wondering, ist is possible to throw an exception in the
ImageModel's contructor? Ok, it is possible, but is it possible to catch
it? Where is ImageModel actually instantiated and do I have a chance to
wrap my try/catch around it?
Guido
void ImagePlugin::registerTypes(const char *uri)
{
qmlRegisterType<ImageModel>(uri, 1, 0, "ImageModel");
}
Q_EXPORT_PLUGIN2(imageplugin, ImagePlugin)
More information about the Interest
mailing list