<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                ### 導航 - [索引](../genindex.xhtml "總目錄") - [模塊](../py-modindex.xhtml "Python 模塊索引") | - [下一頁](installed.xhtml "“為什么我的電腦上安裝了 Python ?”") | - [上一頁](windows.xhtml "Python在Windows上的常見問題") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) ? - zh\_CN 3.7.3 [文檔](../index.xhtml) ? - [Python 常見問題](index.xhtml) ? - $('.inline-search').show(0); | # [圖形用戶界面(GUI)常見問題](#id3) 目錄 - [圖形用戶界面(GUI)常見問題](#graphic-user-interface-faq) - [圖形界面常見問題](#general-gui-questions) - [Python 是否有平臺無關的圖形界面工具包?](#what-platform-independent-gui-toolkits-exist-for-python) - [Tkinter](#tkinter) - [wxWidgets](#wxwidgets) - [Qt](#qt) - [Gtk+](#gtk) - [Kivy](#kivy) - [FLTK](#fltk) - [OpenGL](#opengl) - [有哪些Python的GUI工具是某個平臺專用的?](#what-platform-specific-gui-toolkits-exist-for-python) - [有關Tkinter的問題](#tkinter-questions) - [我怎樣“凍結”Tkinter程序?](#how-do-i-freeze-tkinter-applications) - [在等待 I/O 操作時能夠處理 Tk 事件嗎?](#can-i-have-tk-events-handled-while-waiting-for-i-o) - [在Tkinter中鍵綁定不工作:為什么?](#i-can-t-get-key-bindings-to-work-in-tkinter-why) ## [圖形界面常見問題](#id4) ## [Python 是否有平臺無關的圖形界面工具包?](#id5) 針對不同的(操作系統或)平臺,有多種工具包可供選擇。雖然有些工具包還沒有移植到 Python 3 上,但至少目前 [Tkinter](#tkinter) 以及 [Qt](#qt) 是兼容 Python 3 的。 ### [Tkinter](#id6) Python 的標準編譯包含了 [tkinter](../library/tk.xhtml#tkinter)。這是一個面向對象的接口,指向 Tcl/Tk 微件包。 該接口大概是最容易安裝(因為該接口包含在 Python 的大部分 [二進制發行版](https://www.python.org/downloads/) \[https://www.python.org/downloads/\] 中)和使用的工具包。要了解 Tk 的詳情,比如源代碼等,可訪問 [Tcl/Tk 項目主頁](https://www.tcl.tk) \[https://www.tcl.tk\]。 Tcl/Tk 可完整移植至 Mac OS X,Windows 和 Unix 操作系統上。 ### [wxWidgets](#id7) wxWidgets (<https://www.wxwidgets.org>) 是一個自由、可移植的 GUI 圖形用戶界面類庫,使用 C++ 編寫。它可以在多個操作系統平臺上提供原生自然的界面觀感。包括Windows、Mac OS X、 GTK 和 X11 平臺在內,都是wxWidgets 當前穩定支持的平臺。在語言綁定適配方面,wxWidgets 類庫可用于較多語言,包括 Python,Perl,Ruby等。 [wxPython](https://www.wxpython.org) \[https://www.wxpython.org\] 是 wxWidgets 的 Python 適配。雖然該綁定在更新進度上經常會稍稍落后于 wxWidgets,但它利用純 Python 擴展,提供了許多其他語言綁定沒有實現的特性。wxPython 有一個活躍的用戶和開發者社區。 wxWidgets 和 wxPython 都是自由開源庫。寬松的許可證允許人們在商業軟件、自由軟件和共享軟件中使用它們。 ### [Qt](#id8) Qt 工具包 (可使用 [PyQt](https://riverbankcomputing.com/software/pyqt/intro) \[https://riverbankcomputing.com/software/pyqt/intro\] 或 [PySide](https://wiki.qt.io/PySide) \[https://wiki.qt.io/PySide\]) 及 KDE ([PyKDE4](https://techbase.kde.org/Languages/Python/Using_PyKDE_4) \[https://techbase.kde.org/Languages/Python/Using\_PyKDE\_4\]) 有多個綁定適配可供選擇。 PyQt 當前相較 PySide 更成熟,但如果你想編寫專有軟件,就必須要從 [Riverbank Computing](https://www.riverbankcomputing.com/commercial/license-faq) \[https://www.riverbankcomputing.com/commercial/license-faq\] 購買 PyQt 許可證。 PySide 則可以自由使用于各類軟件。 Qt 4.5 以上版本使用 LGPL 進行許可;此外,商業許可證可從 [Qt 公司](https://www.qt.io/licensing/) \[https://www.qt.io/licensing/\] 那里獲得。 ### [Gtk+](#id9) 面向 Python 的 GObject 內檢綁定 <https://wiki.gnome.org/Projects/PyGObject> 可以用來編寫 GTK+ 3 程序。可以參考 [Python GTK+ 3 導覽](https://python-gtk-3-tutorial.readthedocs.io) \[https://python-gtk-3-tutorial.readthedocs.io\]。 更早的、針對 [Gtk+ 2 工具包](https://www.gtk.org) \[https://www.gtk.org\] 的 PyGtk 綁定,是由 James Henstridge 實現的。具體請參考 <<http://www.pygtk.org>>。 ### [Kivy](#id10) [Kivy](https://kivy.org/) \[https://kivy.org/\] 是一種跨平臺圖形用戶界面庫,同時支持桌面操作系統(Windows,macOS 和 Linux)以及移動設備(Android,iOS)。該庫使用 Python 和 Cython 編寫,可以使用一系列窗口后端。 Kivy 是自由的開源軟件,使用 MIT 許可證分發。 ### [FLTK](#id11) [the FLTK toolkit](http://www.fltk.org) \[http://www.fltk.org\] 的Python綁定是簡單卻功能強大且成熟的跨平臺窗口系統,可以在 [the PyFLTK project](http://pyfltk.sourceforge.net) \[http://pyfltk.sourceforge.net\] 里獲得相關信息。 ### [OpenGL](#id12) 對于OpenGL綁定,請參閱 [PyOpenGL](http://pyopengl.sourceforge.net) \[http://pyopengl.sourceforge.net\]。 ## [有哪些Python的GUI工具是某個平臺專用的?](#id13) 通過安裝 [PyObjc Objective-C bridge](https://pythonhosted.org/pyobjc/) \[https://pythonhosted.org/pyobjc/\],Python程序可以使用Mac OS X的Cocoa庫。 Mark Hammond的 [Pythonwin](windows.xhtml#windows-faq) 包括一個微軟基礎類(MFC)的接口和一個絕大多數由使用MFC類的Python寫成的Python編程環境。 ## [有關Tkinter的問題](#id14) ### [我怎樣“凍結”Tkinter程序?](#id15) Freeze是一個用來創建獨立應用程序的工具。 當凍結(freeze) Tkinter程序時,程序并不是真的能夠獨立運行,因為程序仍然需要Tcl和Tk庫。 一種解決方法是將程序與 Tcl 和 Tk 庫一同發布,并且在運行時使用環境變量 `TCL_LIBRARY` 和 `TK_LIBRARY` 指向他們的位置。 為了獲得真正能獨立運行的應用程序,來自庫里的 Tcl 腳本也需要被整合進應用程序。 一個做這種事情的工具叫 SAM (stand-alone modules,獨立模塊) ,它是 Tix distribution (<http://tix.sourceforge.net/>) 的一部分。 在啟用 SAM 時編譯 Tix ,在 Python 文件 `Modules/tkappinit.c` 中執行對 `Tclsam_init()` 等的適當調用,并且將程序與 libtclsam 和 libtksam 相鏈接(可能也要包括 Tix 的庫)。 ### [在等待 I/O 操作時能夠處理 Tk 事件嗎?](#id16) 在 Windows 以外的其他平臺上可以,你甚至不需要使用線程! 但是你必須稍微修改一下你的 I/O 代碼。 Tk 有與 Xt 的 `XtAddInput()` 對應的調用,它允許你注冊一個回調函數,當一個文件描述符可以進行 I/O 操作的時候,Tk 主循環將會調用這個回調函數。 參見 [File Handlers](../library/tkinter.xhtml#tkinter-file-handlers)。 ### [在Tkinter中鍵綁定不工作:為什么?](#id17) 經常聽到的抱怨是:已經通過 `bind()` 方法綁定了事件的處理程序,但是,當按下相關的按鍵后,這個處理程序卻沒有執行。 最常見的原因是,那個綁定的控件沒有“鍵盤焦點”。請在 Tk 文檔中查找 focus 指令。通常一個控件要獲得“鍵盤焦點”,需要點擊那個控件(而不是標簽;請查看 takefocus 選項)。 ### 導航 - [索引](../genindex.xhtml "總目錄") - [模塊](../py-modindex.xhtml "Python 模塊索引") | - [下一頁](installed.xhtml "“為什么我的電腦上安裝了 Python ?”") | - [上一頁](windows.xhtml "Python在Windows上的常見問題") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) ? - zh\_CN 3.7.3 [文檔](../index.xhtml) ? - [Python 常見問題](index.xhtml) ? - $('.inline-search').show(0); | ? [版權所有](../copyright.xhtml) 2001-2019, Python Software Foundation. Python 軟件基金會是一個非盈利組織。 [請捐助。](https://www.python.org/psf/donations/) 最后更新于 5月 21, 2019. [發現了問題](../bugs.xhtml)? 使用[Sphinx](http://sphinx.pocoo.org/)1.8.4 創建。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看