[PyQt] An "UI update" event/signal to update the GUI on

eliben eliben at gmail.com
Sun Jan 18 20:21:54 GMT 2009




David Boddie wrote:
> 
>> Dividing it into separate signals and slots per each widgets is kind-of
>> kludgy in comparison, don't you think?
> 
> It depends on what level you're managing the interactions between widgets
> and the complexity of the user interface. If, for example, simply checking
> or unchecking a particular checkbox should cause a part of the user
> interface
> to be disabled then using a connection to do that is probably the easiest
> way. One way to tell if this is a possible approach is to try to construct
> the interface in Qt Designer.
> 
> If you want to manage the state of the window at a higher level then it's
> possible to connect signals from widgets (maybe just influential ones) to
> a single slot in your window and manage the state from there. You can then
> just treat this slot like you would the wx.EVT_UI_UPDATE event handler in
> your original application, and perform all the updates there.
> 

I think I see what you're getting at, but I'll have to get my hands dirty in
some code to really feel how the alternative solutions work. I'll post if
there's a specific example I find inconvenient.

P.S. From my C++ Qt (3) days I recall not worrying much about the lack of
this event, so perhaps it really isn't a problem.

Thanks
Eli



-- 
View this message in context: http://www.nabble.com/An-%22UI-update%22-event-signal-to-update-the-GUI-on-tp21527935p21532466.html
Sent from the PyQt mailing list archive at Nabble.com.



More information about the PyQt mailing list