Using PyQT with QT Designer

Phil Thompson phil at riverbankcomputing.com
Fri Aug 23 13:17:24 EDT 2013


On Fri, 23 Aug 2013 08:00:29 -0500, Michael Staggs <tausciam at gmail.com>
wrote:
> I tried that this morning and it destroyed my form. So, right now,
that's
> probably not what I'm looking for.
> 
> But, if you look at that picture, the app isn't resized to 800x600 like
it
> says in the ui file. The pixmaps aren't on the buttons like I set them
up
> in the ui file. It's not using the ui file at all. So, what's the point
of
> making a QT Designer file at all if it doesn't use it?

pyuic4 uses it to generate the corresponding Python code. Any time you
change the .ui file with Designer you have to run pyuic4 again. You should
not modify the Python code that pyuic4 generates.

> I'm guessing it CAN use it and there is just something I'm missing.
> 
> You may be right and I may not want to set the geometry in qt designer
down
> the road. But, right now I do and not only is it not getting that from
the
> ui file....it's not getting anything at all...even though I added all
the
> lines I thought I needed to.
> 
> If I decide to actually change the gui later, I'd like to be able to use
QT
> Designer to do so...design a layout and not really have to change my
> program. As it stands, it's totally ignoring my ui file and I have to
redo
> all the work in the program. In which case, there's no point to using qt
> designer at all.
> 
> I know I have to be missing something though.... there has to be a way
to
> use the work qt designer did.

I strongly suggest you do some more reading about using Designer.

Phil



More information about the Python-list mailing list