1.自己调用命令行

  pyuic4 -o codeFile.py -x yourUIfile.ui

2.写一个批处理,每次双击就行了,跟你的源文件放在同一文件夹下

  

import os
for root, dirs, files in os.walk('.'):
    for file in files:
        if file.endswith('.ui'):
            os.system('pyuic4 -o %s.py -x %s' % (file.rsplit('.'1)[0], file))
        elif file.endswith('.qrc'):
         os.system('pyrcc4 -o %s_rc.py %s' % (file.rsplit('.'1)[0], file))

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-10
  • 2021-11-24
  • 2022-01-25
  • 2022-12-23
  • 2021-04-24
  • 2021-06-03
猜你喜欢
  • 2021-12-28
  • 2022-01-18
  • 2021-09-16
  • 2021-10-17
  • 2021-10-15
  • 2021-12-18
相关资源
相似解决方案