翻譯|使用教程|編輯:鮑佳佳|2021-08-23 11:09:19.287|閱讀 85 次
概述:主題描述了如何為常規(guī) Python App 添加 Qtitan 組件。本主題中描述的步驟與任何 Qtitan 組件相關(guān) - QtitanRibbon、QtitanChart、QtitanNavigation、QtitanDocking、QtitanDataGrid。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
主題描述了如何為常規(guī) Python App 添加 Qtitan 組件。本主題中描述的步驟與任何 Qtitan 組件相關(guān) - QtitanRibbon、QtitanChart、QtitanNavigation、QtitanDocking、QtitanDataGrid。
要使用 Qtitan Component for Python,您需要:
Additionally the bindings will be installed to the your Python third-party libraries folder where the PySide2 was installed. For instance: c:\Python\Python37-32\Lib\site-packages\PySide2 c:\Python\Python37-32\Lib\site-packages\shiboken2 c:\Python\Python37-32\Lib\site-packages\DevMachines
要為您的環(huán)境獲取 Python 站點包目錄,請在 shell 中執(zhí)行以下命令行:
python -c "import site; print(site.getsitepackages())"
將 Qtitan 組件添加到 Python 文件中。DevMachines 命名空間中的所有組件。
from DevMachines.QtitanBase import WindowTitleBar from DevMachines.QtitanRibbon import AdobePhotoshopStyle, Office2016Style
類比其他 Qtitan 組件:
from DevMachines.QtitanGrid import Grid from DevMachines.QtitanNavigationDesignUI import NavigationView
運行您的 Python 應(yīng)用程序并確保沒有任何錯誤和警告。
主題描述了如何從源代碼構(gòu)建Qtitan For Python 組件綁定。
對于 Visual Studio,您必須使用 Visual Studio Toolkit 2015 來構(gòu)建綁定。如果您將使用 2017 Toolkit,您將收到來自 shiboken2-generator 的錯誤。
Open the bat shell. "Windows logo key" + R, cmd.exe Set current directory to the <QTITAN_INSTALL_PATH>. C:/>dir <QTITAN_INSTALL_PATH> vcvars32_2015.bat qmake.exe -r CONFIG+=python -platform win32-msvc nmake release
在構(gòu)建過程之后,您將在 <QTITAN_INSTALL_PATH>site-packages/DevMachines 文件夾中擁有一個新的綁定庫。
Qt組件推薦:
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉(zhuǎn)載自: