[Qt-jambi-interest] Subclassing QLayout & QNoNativeResourcesException
Lists
lists at sibvisions.org
Thu Dec 10 13:54:19 CET 2009
Hi!
It's hard to find an error without posting your code :)
Attached you can find a BorderLayout implementation.
It's part of the QT implementation from the JVx Enterprise Application
Framework.
It's still in development, but it's open source (Apache 2.0 licence) and
maybe the class will help you as template?
The referenced classes are not included, but i think that's not a problem
for you.
> -----Ursprüngliche Nachricht-----
> Von: qt-jambi-interest-bounces at trolltech.com [mailto:qt-jambi-interest-
> bounces at trolltech.com] Im Auftrag von Frank Bergmann
> Gesendet: Donnerstag, 10. Dezember 2009 01:28
> An: qt-jambi-interest at trolltech.com
> Betreff: [Qt-jambi-interest] Subclassing QLayout &
> QNoNativeResourcesException
>
> Hello,
>
> I had to implement a custom Layout but somehow things just don't work
> as
> planned, directly after adding an item to the layout, like so:
>
> contentsWidget.layout().addWidget(legendItem);
>
> and verifying by debugging addItem(QLayoutItemInterface item), that
> everything is fine on my end (I even made sure that itemAt(index)
> within my
> Layout class would return the right thing). However as soon as the
> addWidget
> call completes, I'm in trouble:
>
> contentsWidget.layout().itemAt(0).widget()
>
> returns with a com.trolltech.qt.QNoNativeResourcesException. (And that
> even
> though my legendItem is still just fine.) The message that I get is:
>
> "Function call on incomplete object of type:
> com.trolltech.qt.gui.QLayoutItem$ConcreteWrapper"
>
> Which is not at all helpful. As final straw I turned to the
> documentation:
>
> http://qt.nokia.com/doc/qtjambi-4.5.2_01/index.html
>
> which hints at implementations of a BorderLayout and FlowLayout
> example,
> however
>
> http://qt.nokia.com/doc/qtjambi-4.5.2_01/com/trolltech/qt/layouts-
> borderlayo
> ut.html
> http://qt.nokia.com/doc/qtjambi-4.5.2_01/com/trolltech/qt/layouts-
> flowlayout
> .html
>
> both are not very informative. I hope I can find some clues here,
>
> cheers
> Frank
>
> _______________________________________________
> Qt-jambi-interest mailing list
> Qt-jambi-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest
-------------- next part --------------
A non-text attachment was scrubbed...
Name: QVxBorderLayout.java
Type: application/octet-stream
Size: 14200 bytes
Desc: not available
Url : http://lists.qt.nokia.com/pipermail/qt-jambi-interest/attachments/20091210/f8660e3a/attachment.obj
More information about the Qt-jambi-interest
mailing list