Re: [PyQt] QDataWidgetMapper and addMapping with a custom property name: setProperty never called

2010-11-10 Thread TP
If I am right, none of the properties of QTextEdit is virtual. So none can be reimplemented... It is not easy to change the default behavior in these conditions. Finally I have found a solution: using QPlainTextEdit instead of QTextEdit: the default property is plainText, not html as in

[PyQt] QDataWidgetMapper and addMapping with a custom property name: setProperty never called

2010-11-09 Thread TP
Hello, I currently use QDataWidgetMapper with a custom property name: self.mapper.addMapping( widget, index, propertyName ) Now let us look at the private method populate() of src/gui/itemviews/qdatawidgetmapper.cpp (Qt source code): // void QDataWidgetMapperPrivate::populate(WidgetMapper

Re: [PyQt] QDataWidgetMapper and addMapping with a custom property name: setProperty never called

2010-11-09 Thread Phil Thompson
On Tue, 9 Nov 2010 20:29:43 +0100, TP paratribulati...@free.fr wrote: Hello, I currently use QDataWidgetMapper with a custom property name: self.mapper.addMapping( widget, index, propertyName ) Now let us look at the private method populate() of src/gui/itemviews/qdatawidgetmapper.cpp

Re: [PyQt] QDataWidgetMapper and addMapping with a custom property name: setProperty never called

2010-11-09 Thread TP
Phil Thompson wrote: setProperty() isn't virtual so you can't reimplement it in Python. Thanks a lot. And neither can I reimplement it in C++, if I am right. I am not very familiar to C++ programming, now I know what a virtual function is! Julien