Using PyQT with QT Designer

tausciam at gmail.com tausciam at gmail.com
Fri Aug 23 19:39:12 EDT 2013


Thank you. I just deleted all of them, reran pyuic4 on window.ui and regenerated window.py just to make sure. Unfortunately, I get the same problem.

I've got the GUI perfectly designed just like I want it in window.py... just can't figure out how to use it in my program.

On Friday, August 23, 2013 3:16:59 PM UTC-5, Dave Angel wrote:
> Michael Staggs wrote:
> 
> 
> 
> 
> 
> >
> 
> > That's the problem though. It is exactly how I want it in designer. It's
> 
> > perfect as it is in designer when I preview it. Here is a screenshot of the
> 
> > preview: http://i.imgur.com/ULRolq8.png
> 
> >
> 
> > The problem isn't that I can't design it in QT Designer. It is designed
> 
> > just like I want it. The problem is, when I try to follow zetcode and other
> 
> > tutorials about how to import and use my form as designed by qt designer
> 
> > and run through pyuic4.... it doesn't seem to even notice my ui file...and
> 
> > certainly isnt acting on it.
> 
> >
> 
> 
> 
> I don't know PyQT, so I've kept quiet so far...
> 
> 
> 
> You don't say what the name of the generated file is, but perhaps since
> 
> the source file was window.ui, the generated one is window.py
> 
> 
> 
> My guess is that when you do the
> 
> 
> 
> from window import Ui_MainWindow
> 
> 
> 
> it is finding some OTHER window.py file.
> 
> 
> 
> Have you tried simply adding an illegal line to the generated file, to
> 
> force the compiler to fail the import?  Once you're sure that it is
> 
> importing this particular file, you can remove such a line.
> 
> 
> 
> Could be that you have some other window.py file  (or window.pyc, or
> 
> whatever) and that it's finding that one.  Or it's finding some older
> 
> version of this one.
> 
> 
> 
> 
> 
> 
> 
> -- 
> 
> DaveA




More information about the Python-list mailing list