[PyQt] Adding properties to a custom widget

skawaii skawaii at gmail.com
Mon Sep 10 17:34:28 BST 2007

Phil Thompson-2 wrote:
> On Monday 10 September 2007, skawaii wrote:
>> Phil Thompson-2 wrote:
>> > Sorry, you're out of luck - you need PyQt4 for this.
>> >
>> > Phil
>> > _______________________________________________
>> > PyQt mailing list    PyQt at riverbankcomputing.com
>> > http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>> Seriously? The functionality to add properties is in Qt 3.x, right? Does
>> that mean that PyQt just doesn't have bindings for creating properties
>> for
>> custom widgets?
> PyQt3 doesn't. PyQt4 does.
>> That's pretty confusing, especially since Designer let's you add
>> properties
>> to custom widgets.
> No it doesn't. It allows you to set custom properties.
Ah, ok. So it's not for creating properties, just setting them. Got
it...although that doesn't seem clear at all when you're actually looking at
the screen in Designer. 

>> However, it only calls QWidget.setProperty(). So, 
>> assuming I had Qt 4.3, where would I be creating these properties anyway,
>> because it doesn't seem like Designer does it.
> In PyQt4 you do it with pyqtProperty() - see the documentation.

Yeah, I know about pyqtProperty(), as was indicated in my first post. But
like you said, that's PyQt4. Oh well. Guess I'm out of luck and will have to
come up with some crazy work-around.

View this message in context: http://www.nabble.com/Adding-properties-to-a-custom-widget-tf4403448.html#a12597219
Sent from the PyQt mailing list archive at Nabble.com.

More information about the PyQt mailing list