如何配置Qt Designer在OSX中加载PyQt小部件? [英] How to configure Qt Designer to load PyQt widget in OSX?

查看:111
本文介绍了如何配置Qt Designer在OSX中加载PyQt小部件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以前,我在Windows中广泛使用PyQt:其随附的PyQt包括PyQt Designer,该PyQt Designer将加载使用Python开发的任何PyQt Designer插件.这使我可以轻松地将这些PyQt小部件拖放到PyQt Designer中.

Previously I work using PyQt extensively in Windows: its shipped PyQt include PyQt Designer that'll load any PyQt Designer Plugin developed using Python. This allow me to easily drag and drop those PyQt widgets in PyQt Designer.

我还没有从源代码编译PyQt,但是我从这个问题,看来来源仍然不包括PyQt Designer.目前,我正在使用通过brew安装的Qt和PyQt.

I haven't compile PyQt from source, but what I get from this question, it seems like the source still not including PyQt Designer. Currently, I am using Qt and PyQt installed using brew.

那么,我们如何配置Qt Designer(C ++)来允许它加载任何PyQt小部件?

So, how do we configure Qt Designer (the C++ one) to allow it load any PyQt widgets?

推荐答案

The question you linked to explains it very well. There is no such thing as "PyQt Designer". There is only Qt Designer, which should be installed along with Qt itself.

PyQt提供了一个插件,该插件可以启用自定义窗口小部件来用python 为Qt Designer编写.除非安装了PyQt,否则默认情况下会安装此插件,除非使用--no-designer-plugin选项明确将其配置为不安装.

PyQt provides a plugin that enables custom widgets to be written in python for Qt Designer. This plugin is installed by default when PyQt is installed, unless it was explicitly configured not to by using the --no-designer-plugin option.

如果启动Qt Designer并打开帮助"->关于插件",您应该会在其中看到某种python或pyqt插件-在Mac OSX上,我认为该插件应安装在/Developer/Applications/Qt/plugins/designer/中.)

If you start Qt Designer and open Help -> About Plugins, you should see some kind of python or pyqt plugin listed there - on Mac OSX, I think the plugin should be installed in /Developer/Applications/Qt/plugins/designer/).

这篇关于如何配置Qt Designer在OSX中加载PyQt小部件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆