Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'yet.': 0.04; 'modify': 0.07; 'back.': 0.09; 'buttons': 0.09; 'wrong,': 0.09; 'cc:addr :python-list': 0.11; 'python': 0.11; 'gui': 0.12; 'suggest': 0.14; 'posted': 0.15; '.ui': 0.16; '23,': 0.16; 'did.': 0.16; 'guessing': 0.16; 'ignoring': 0.16; 'redo': 0.16; 'resizing': 0.16; 'all.': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'obviously': 0.18; 'app': 0.19; 'trying': 0.19; 'pfxlen:0': 0.19; 'aug': 0.22; 'email addr:gmail.com>': 0.22; 'cc:addr:python.org': 0.22; "aren't": 0.24; "shouldn't": 0.24; 'decide': 0.24; 'file.': 0.24; "haven't": 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; "i've": 0.25; '>': 0.26; 'right.': 0.26; 'tutorials': 0.26; 'asking': 0.27; 'header:In-Reply-To:1': 0.27; 'tried': 0.27; 'point': 0.28; 'michael': 0.29; "doesn't": 0.30; 'designer': 0.30; 'strongly': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'code': 0.31; 'getting': 0.31; 'lines': 0.31; 'towards': 0.31; 'anyone': 0.31; 'file': 0.32; 'this.': 0.32; 'probably': 0.32; 'front': 0.32; 'run': 0.32; 'says': 0.33; 'fri,': 0.33; 'totally': 0.33; "i'd": 0.34; 'problem': 0.35; 'subject:with': 0.35; 'something': 0.35; 'case,': 0.35; 'form.': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'really': 0.36; 'doing': 0.36; "didn't": 0.36; "i'll": 0.36; 'should': 0.36; 'wrong': 0.37; 'so,': 0.37; 'too': 0.37; 'window': 0.38; 'needed': 0.38; 'pm,': 0.38; 'little': 0.38; 'anything': 0.39; 'explain': 0.39; 'morning': 0.39; 'how': 0.40; 'read': 0.60; 'took': 0.61; 'course': 0.61; 'advanced': 0.63; 'making': 0.63; 'more': 0.64; 'account': 0.65; 'media': 0.66; 'lose': 0.68; 'designer.': 0.84; 'missing.': 0.84; 'phil': 0.84; 'picture,': 0.84; 'road.': 0.84; 'subject:Using': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ZMs7sd8ay2EzR+L3RI95fKPb9zhDdIeo/t0EQVj1xMQ=; b=xLfrknQNcTanxNQntNAYTo/k0SbqQDXG+TOr5nBJNJJOOi/JZBLSQt8hnbc+hAUsgt jQ7Cw4WTgU+Ir85RZR5S69OM19MrqaQ7lrlimrJhkgx7Fv9Uhbrk6dOZpS0azKS3gvYl CcXgtMnW6pnpsCGgj2w5M/D4LqtoiN6icO0SYN7kWDQ1G+1TD0hq2KQtCSKCThXLxMqH U6XEj96Xl9e7TbBVH+lywPYyVPpGYoRIR8EtDSoSdXUj3osT4kR27+pqRGu93xQG6AQN dP1l2CRFEWHrGWl8VC7j38KNxE784JKRLVjkLcQKE+pk8/+uKvLUQgoUH7eeJzJQ5Q0m ptqQ== MIME-Version: 1.0 X-Received: by 10.112.156.166 with SMTP id wf6mr95154lbb.13.1377279041836; Fri, 23 Aug 2013 10:30:41 -0700 (PDT) In-Reply-To: References: <1900623.ob0ITRdHWt@tannhaus-pc> <8f9d0148-fda3-4139-ab45-a8be6da8320f@googlegroups.com> <5e17639a06ae1e82ca2ba37b5346d001@localhost> Date: Fri, 23 Aug 2013 12:30:41 -0500 Subject: Re: Using PyQT with QT Designer From: Michael Staggs To: Phil Thompson Content-Type: multipart/alternative; boundary=001a11c18e7a0b9ba204e4a0c47a Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 157 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1377279049 news.xs4all.nl 15904 [2001:888:2000:d::a6]:33876 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:52905 --001a11c18e7a0b9ba204e4a0c47a Content-Type: text/plain; charset=ISO-8859-1 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" wrote: > On Fri, 23 Aug 2013 08:00:29 -0500, Michael Staggs > 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 > --001a11c18e7a0b9ba204e4a0c47a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

Right. I know that if I redesign it I have to run pyuic4 aga= in 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 f= ound 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 c= ourse 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 t= o something that would explain what I'm doing wrong, I'll read it f= rom 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&qu= ot; <phil@riverbankcomput= ing.com> wrote:
On Fri, 23 Aug 2013 08:00:29 -0500, Michael Staggs <tausciam@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<= br> not modify the Python code that pyuic4 generates.

> I'm guessing it CAN use it and there is just something I'm mis= sing.
>
> 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 us= ing 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
--001a11c18e7a0b9ba204e4a0c47a--