Using PyQT with QT Designer

Michael Staggs tausciam at gmail.com
Fri Aug 23 09:00:29 EDT 2013


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?

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.

Thanks
On Aug 23, 2013 2:39 AM, "Phil Thompson" <phil at riverbankcomputing.com>
wrote:

> On Thu, 22 Aug 2013 18:08:14 -0700 (PDT), tausciam at gmail.com wrote:
> > On Thursday, August 22, 2013 3:26:17 AM UTC-5, Phil Thompson wrote:
> >
> >> It looks like you aren't using a layout to arrange your widgets.
> >>
> >> Explicitly specifying geometries is a bad idea.
> >>
> >>
> >>
> >> Phil
> >
> > Thanks.QT Designer uses set geometry
>
> ...only because you have told it to...
>
> > and I'm totally lost as how to
> > implement it. I've tried using a layout on the central widget. I've
> tried
> > specifically referencing the Ui_MainWindow in the window.py ui file...
>
> You need to read up on how to use layouts in Designer. The generated .py
> file will then do what you want automatically.
>
> Phil
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130823/9b94170c/attachment.html>


More information about the Python-list mailing list