[PyQt] updating from python variables

Phil Thompson phil at riverbankcomputing.com
Sat Feb 5 17:30:47 GMT 2011


On Sat, 05 Feb 2011 18:18:12 +0100, Achim Kisseler
<ak7 at jupiter.uni-freiburg.de> wrote:
> Hi everyone,
> 
> I am building an app, where many variables depend on each other. Like 
> a=5, b=10, c=(a+b)/5 or "when selected something, a becomes a+=1" and so
> on.
> 
> This is very easy eg. with an libreoffice calc sheet, but with pyqt..? 
> There are to many variables to keep it handy. And I need to keep the 
> values in the gui up to date.
> 
> Is there an method to bind labels, spin-boxes and so on to variables, 
> that, when one changes, the other does? Like a 'global update' or 
> 'signal to all dependent slots'.
> 
> I found something, that looked right at the first look, but I dont quite

> understand it: 
>
http://diotavelli.net/PyQtWiki/Binding%20widget%20properties%20to%20Python%20variables.
> 
> Further, it wouldnt help me to update all dependent slots, does it?
> 
> Hope, someone has an idea,
> thanks in advance,
> achim

This is a fundamental feature of dip...

http://www.riverbankcomputing.com/software/dip/intro

...but it is still under development (although that aspect of it is stable
enough).

Phil


More information about the PyQt mailing list