[PySide] combining two default widgets
Frank Rueter | OHUfx
frank at ohufx.com
Sun Oct 20 07:37:25 CEST 2013
Hi all,
I have written a custom comboBox which renders like a progress bar.
Depending on which item is chosen, the progress bar is updated accordingly:
http://pastebin.com/yWACCHH0)
Initially I thought I'd be cheeky and try to inherit both QComboBox and
QProgessBar (in that order) to see if this is the easiest way to do
this, but the app crashed as soon as I used self.setItems() in the
constructor.
I don't have a lot of experience with inheriting more than one object,
so thought I'd ask you guys for general guide lines (if there are any).
I'd imagine it's only safe to do if you know that none of the respective
attributes cause conflicts?!
Also, is the above code an ok way of doing this? I would just like to
know if this is how the pros would do it and avoid bad habits.
Cheers,
frank
More information about the PySide
mailing list