python - Qt Designer for PyQt on OSX 10.6 -


i liked qt designer on windows making guis python applications (using pyqt4) went , tried install on mac (under osx 10.6.6).

at point, have installed sip, qt4, , pyqt4.

the pyqt binary installers (for windows) include version of qt designer works pyqt. on osx, there no binary installer, source. no qt designer.

the qt website offers qt creator download, far can tell, requires you're writing code in c/c++.

is there way make qt creator work pyqt? or there gui designer pyqt works on mac?

thanks! -wesley

if you've installed qt4, have qt designer. if used installer qt.nokia.com, should in /developer/applications/qt.

qt designer works fine pyqt. qt designer spits out xml describing ui structure. if using standard qt c++, have run uic tool generate c++ .ui files. likewise, pyqt4, must run pyuic4 on generated .ui file create python source it.

if you're looking full ide solution handles of pyqt automatically, i'm unaware of existence of one. have build_helper.py script processes of .ui files , places them in appropriate place in python package i'm developing. run build helper script before running actual main program ensure generated code date.

all of .ui files go subfolder ui in project root. script creates python source , places 'myapp/ui/generated'.

for example:

import os.path pyqt4 import uic  generated_ui_output = 'myapp/ui/generated'  def process_ui_files():     ui_files = (glob.glob('ui/*.ui'),                 glob.glob('ui/dialogs/*.ui'),                 glob.glob('ui/widgets/*.ui')))     f in ui_files:         out_filename = (             os.path.join(                 generated_ui_output,                 os.path.splitext(                     os.path.basename(f))[0].replace(' ', '')+'.py')         )         out_file = open(out_filename, 'w')         uic.compileui(f, out_file)         out_file.close()  if __name__ == '__main__':     process_ui_files() 

i have few other functions in there running pyrcc4 resource compilation , pylupdate4 , lrelease generate translations.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -