Pyqt正则表达式编辑器

QRegexEditor的Python项目详细描述


关于

qregexeditor是用python和 皮奎特。

您可以将qregexeditor用作独立应用程序,也可以用作小部件 在您自己的PyQt/PySide应用程序中

该工具的灵感来自:

安装

首先从pypi安装包:

pip install qregexeditor --upgrade

然后您可以运行应用程序:

QRegexEditor

依赖关系

  • Python(2.7或>;=3.2)
  • PyQt5或PySide或PyQt4

在自定义PyQt应用程序中使用小部件

将该小部件用作任何其他qt小部件

可以通过编程方式指定正则表达式和字符串模式。 您可能还想连接到quick_ref_requested信号,以便 应用程序可以在最合适的位置显示/隐藏快速引用小部件。

"""
This example show you how to use the widget in a custom application.
"""importsysfromPyQt5.QtWidgetsimportQApplication,QMainWindow# if you use PyQt4 or PySide, you must set the QT_API environment variable# to select the proper bindings, see# https://github.com/pyQode/pyQode/wiki/Getting-started#qt-bindings-selectionfromqregexeditor.apiimportRegexEditorWidget,QuickRefWidgetapp=QApplication(sys.argv)window=QMainWindow()editor=RegexEditorWidget()quick_ref=QuickRefWidget()quick_ref.hide()window.setCentralWidget(editor)# show/hide quick reference widgeteditor.quick_ref_requested.connect(quick_ref.setVisible)window.show()app.exec_()

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
构造函数如何在Java中使用foreach循环构造LinkedList?   通过jsp发送电子邮件时出现java错误(SMTP EXIM)   EDI流到Java对象转换中的edifact异常   surefireplugin 2.22.2的java Maven构建   在Java中初始化变量一次(从文件中读取并存储在ArrayList/HashMap中)   java是不可修改列表线程安全的吗?   数组无法解析“java.lang.ArrayStoreException”   java Dynamic/Onspot JTextfield到JLabel   java在JavaFXTextArea中显示来自XSLT转换的XML   Java8流通过比较两个列表进行过滤   java在多个EC2实例上更新日志级别   未拾取java IntelliJ maven项目生成的源代码(仅部分)   eclipse在Java8中用函数抽象try/catch   JavaSwing:获取位于前面或焦点中的窗口   java监控Kafka消费者延迟并生成警报   java如何检查一个数字是否超过100,并返回多少?   算法:有用于阻止非英语单词的Java函数吗?