[PyQt] dip: how to connect the model with ui-view

Phil Thompson phil at riverbankcomputing.com
Tue Feb 8 22:05:31 GMT 2011


On Tue, 08 Feb 2011 22:50:48 +0100, Achim Kisseler
<ak7 at jupiter.uni-freiburg.de> wrote:
> Hi everyone,
> 
> I managed (thank Phil) to integrate the file I created with ui-designer 
> correct.
> 
> Now I trying to set up the connection with the model and a controller. 
> But the vars I define in the model do not init the desired attributes:

As I said in an earlier email, Designer is no good for what you said you
wanted to do. It's intended just to allow you include the GUI from a .ui
file as a black box. Instead you have to define the view declaratively,
either implicitly (where dip creates the view based on the types of the
attributes in the model) or explicitly (where you can specify parts of the
view to get complete control over what is created).

Having said that, there is no reason why Designer couldn't wire up the
widgets in a .ui file to model attributes - it just needs a mapping between
widget object names and the attribute names. I'm working on that at the
moment.

Phil


More information about the PyQt mailing list