首先,我按照以下步骤安装QScintilla:
1:
cd Qt4Qt5
qmake qscintilla.pro
sudo make
make install
Run Code Online (Sandbox Code Playgroud)
2:
cd ../designer-Qt4Qt5
qmake designer.pro
sudo make
sudo make install
Run Code Online (Sandbox Code Playgroud)
3:
cd ../Python
python3 configure.py --pyqt=PyQt5
sudo make
Run Code Online (Sandbox Code Playgroud)
在这里我遇到了问题:
QAbstractScrollArea: No such file or directory
Run Code Online (Sandbox Code Playgroud)
和问题:
qprinter.h: No such file or directory
Run Code Online (Sandbox Code Playgroud)
但我终于通过手动添加所需文件解决了这些问题.
继续:
sudo make install
Run Code Online (Sandbox Code Playgroud)
4:
然后我输入以下命令安装eric6:
sudo python3 install.py
Run Code Online (Sandbox Code Playgroud)
但我得到了:
检查依赖项
Python版本:3.4.0
找到PyQt5
对不起,请安装QScintilla2及其PyQt5/PyQt4包装器.
错误:/usr/lib/python3/dist-packages/PyQt5/Qsci.so:未定义符号:_ZTI13QsciScintilla
我开发了一个使用 qscintilla 作为文本编辑器的应用程序。我还实现了自定义词法分析器来突出语言特定的关键字。到目前为止,突出显示关键字的样式在我的应用程序中是硬编码的,并且在 Windows/Linux(Ubuntu)/Mac 上的默认主题中看起来很不错。
当用户选择深色主题(在 Linux 上)时会出现问题。根据 QScintilla 版本,编辑器的某些部分确实反映了当前的主题颜色,而其他部分则没有。此外,我的自定义样式在深灰色背景上呈现深蓝色字母。
我正在寻找一些 Qt 类,这将允许我访问当前系统主题。我不想为我的应用程序小部件定义样式。我想知道什么是系统默认的非比例字体,它的大小、颜色是什么……如果我知道使用了深色方案,我会选择互补色来突出显示关键字。
我检查了 QStyle、QPlatformTheme 和其他 qt 类的文档,在我看来,它们更多地用于定义新样式,然后用于描述当前样式。
我正在旧的Linux系统(CentOS 4.4)上安装PyQt4,由于硬件兼容性原因无法升级.我安装了Python 2.6,QT4和SIP,并且PyQt4的安装没有给我任何错误.
当我运行Python时,会发生这种情况:
Python 2.6.2 (r262:71600, May 11 2011, 14:18:37)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyQt4
>>> import PyQt4.Qsci
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named Qsci
Run Code Online (Sandbox Code Playgroud)
我环顾四周,发现/usr/local/lib/python2.6/site-packages/PyQt4/uic/widget-plugins/qscintilla.py,几乎没有评论的东西:
pluginType = MODULE
def moduleInformation():
return "PyQt4.Qsci", ("QsciScintilla", )
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?
qscintilla ×4
pyqt ×3
linux ×2
python ×2
qt ×2
autocomplete ×1
c++ ×1
compilation ×1
pyqt5 ×1
qt5 ×1
themes ×1