Hi folks,

I extend the QHeaderView class and customize its behavior, including the
setModel(..) method. But as soon as I call its super part an exception is
thrown. Please see below for a short example and the exception. Is this an
known issue?

Regards, Paolo


##############
public class Test {

    public static void main(String[] args) {
        QApplication app = new QApplication(args);

        QHeaderView hv = new QHeaderView(Orientation.Vertical) {
            @Override
            public void setModel(QAbstractItemModel model) {
                super.setModel(model);
            }
        };
        QTableView view = new QTableView();
        view.setHorizontalHeader(hv);

        QApplication.exec();
    }
}

###############
java.lang.RuntimeException: Cannot set field '__rcModel
    at
com.trolltech.qt.internal.QtJambiInternal.setField(QtJambiInternal.java:633)
    at
com.trolltech.qt.GeneratorUtilities.setField(GeneratorUtilities.java:70)
    at com.trolltech.qt.gui.QHeaderView.setModel(QHeaderView.java:985)
    at Test$1.setModel(Test.java:20)
    at
com.trolltech.qt.gui.QTableView.__qt_setHorizontalHeader_QHeaderView(Native
Method)
    at
com.trolltech.qt.gui.QTableView.setHorizontalHeader(QTableView.java:334)
    at Test.main(Test.java:24)
_______________________________________________
Qt-jambi-interest mailing list
Qt-jambi-interest@qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-jambi-interest

Reply via email to