On Thursday, 2013-10-31, 20:17:43, Konrad Rosenbaum wrote:
> Hi,
> 
> I'm trying to port KDAB's DeclarativeWidgets[1] to Qt5. 

Cool!

> I've got it running
> for trivial QML files, however as soon as there are child widgets the
> running program aborts.
> 
> The abort is caused by QObject::setParent, which contains this little gem:
> Q_ASSERT(!d->isWidget);

Hmm. The same code is in Qt4. I think it "works for me/us" because we are 
building against our distribution's Qt packages which are release builds and 
thus doesn't have the Q_ASSERT.

> I kind of ran out of ideas on how to solve this. Should I consider
> setParent, qqmlvme or the direct use of QWidgets as a bug?

I agree with Alan on setParent() being in error, the problem is some other 
areas rely on that. E.g. QWidget::parentWidget() does a static_cast of 
parent() to QWidget*

Cheers,
Kevin

-- 
Kevin Krammer | [email protected] | Software Engineer
Klarälvdalens Datakonsult AB, a KDAB Group company
Tel. Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
KDAB - Qt Experts - Platform-independent software solutions

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to