pyotherside 试用
pyotherside 試用
這是啥?
用python寫qt
步驟:
安裝qt: http://www.qt.io/download-open-source/#section-2
安裝python3:
下載源代碼 https://github.com/thp/pyotherside
編譯 pyotherside:?? ?他主頁(yè)上有一個(gè)簡(jiǎn)短的說明
??? qmake
??? make
??? make install
?? ?
編譯完可以執(zhí)行個(gè)測(cè)試?? ? ./tests/tests
?
運(yùn)行example程序
F:\wamp\www\git_repos\GitHub\pyotherside>qmlscene F:\wamp\www\git_repos\GitHub\pyotherside\examples\helloworld.qml
qml: PyOtherSide version: 1.4.0
qml: Python version: 3.4.3
qml: python error: Not a parameter list in call to pyotherside.send:
"PyOtherSide error: No module named 'thismoduledoesnotexisthopefully'"
qml: python error: Cannot import module: thismoduledoesnotexisthopefully (No module named 'thismodul
edoesnotexisthopefully')
"PyOtherSide error: invalid syntax (<string>, line 1)"
qml: python error: Cannot evaluate '[ 123 [.syntax234-error!' (invalid syntax (<string>, line 1))
qml: Python module "os" is now imported
qml: python error: Not a parameter list in call to os.chdir:
qml: python error: Not a parameter list in call to os.listdir:
qml: files in /: undefined
qml: dir listing: .git,docs,examples,LICENSE,Makefile,pyotherside.pri,pyotherside.pro,python.pri,REA
DME,src,tests
關(guān)于pyotherside的視頻:有什么特點(diǎn),內(nèi)部是怎樣個(gè)原理, 怎樣用
https://www.youtube.com/watch?v=2HAFOZ5_Xks
?
Q1: This application failed to start because it could not find or load the Qt platfo rm plugin "windows".
path F:\sw\Qt\Qt5.4.2\5.4\msvc2013_opengl\bin;F:\sw\Qt\Qt5.4.2\Tools\QtCreator\bin;
注意順序!
?
Q2:file:///F:/wamp/www/git_repos/GitHub/pyotherside/examples/helloworld.qml:2 module "io.thp.pyotherside" is not installed
file:///F:/wamp/www/git_repos/GitHub/pyotherside/examples/helloworld.qml:2 module "io.thp.pyotherside" plugin "pyothersideplugin" not found
這是因?yàn)橄到y(tǒng)不知道這個(gè)plugin在哪里
執(zhí)行 nmake install就可以
其實(shí)他是執(zhí)行了這兩條命令
copy /y "release\pyothersideplugin.dll" "F:\sw\Qt\Qt5.4.2\5.4\msvc2013_opengl\qml\io\thp\pyotherside\pyothersideplugin.dll"
copy /y F:\wamp\www\git_repos\GitHub\pyotherside\src\qmldir F:\sw\Qt\Qt5.4.2\5.4\msvc2013_opengl\qml\io\thp\pyotherside
而dmldir文件內(nèi)容為
module io.thp.pyotherside
plugin pyothersideplugin
總結(jié)
以上是生活随笔為你收集整理的pyotherside 试用的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Java 解决采集UTF-8网页空格变成
- 下一篇: 如何优雅地「蜗居」?