是一个用于给Qt增加新部件的库。在PyQt4中,我们可以使用Qscintilla2。下载并解压源文件, 安装(linux/unix):
复制代码
1
2
3qmake qscintilla.pro make make install
进入Python目录,运行命令:
复制代码
1
2
3python configure.py make make install
切换到designer-Qt4,运行:
复制代码
1
2
3qmake designer.pro make make install
安装结束。运行以下代码测试:
复制代码
1
2
3
4
5import PyQt4.Qsci langs = [i for i in dir(PyQt4.Qsci) if i.startswith('QsciLexer')] for i,l in enumerate(langs): print i,l[9:]
结果:
复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
230 1 Bash 2 Batch 3 CMake 4 CPP 5 CSS 6 CSharp 7 D 8 Diff 9 HTML 10 IDL 11 Java 12 JavaScript 13 Lua 14 Makefile 15 POV 16 Perl 17 Properties 18 Python 19 Ruby 20 SQL 21 TeX 22 VHDL
最后
以上就是长情唇膏最近收集整理的关于(转)QScintilla2和PyQt4的全部内容,更多相关(转)QScintilla2和PyQt4内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复