Using PyQT with QT Designer

Michael Staggs tausciam at gmail.com
Fri Aug 23 13:30:41 EDT 2013


Right. I know that if I redesign it I have to run pyuic4 again and that I
shouldn't change that file...let qt designer do its job.

But, that's exactly what I'm having the problem with...incorporating the
file pyuic4 gave me... and why I posted here.

If you can point me towards something I need to read then by all means...
I'd be grateful. But, all the little tutorials I've found told me to do it
this way and obviously my program has no access to it....it's not resizing
the window or doing anything the ui file states. So, I do know I'm doing
something wrong and doing something the little tutorials didn't account
for. So, I'm asking here.

Again, I'm just learning. I took the codecademy python course and started
trying to learn to build a media player...and haven't figured out how to
build the gui yet. If you or anyone else can point me to something that
would explain what I'm doing wrong, I'll read it from front to back. If
it's too advanced it will lose me....but I would like to learn to do this.
On Aug 23, 2013 12:17 PM, "Phil Thompson" <phil at riverbankcomputing.com>
wrote:

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130823/c947cdce/attachment.html>


More information about the Python-list mailing list