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: [email protected] [mailto:qt-jambi-interest-
> [email protected]] Im Auftrag von Frank Bergmann
> Gesendet: Donnerstag, 10. Dezember 2009 01:28
> An: [email protected]
> 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
> [email protected]
> http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest

Attachment: QVxBorderLayout.java
Description: Binary data

_______________________________________________
Qt-jambi-interest mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest

Reply via email to