{"id":1014909,"date":"2024-12-27T12:00:33","date_gmt":"2024-12-27T04:00:33","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1014909.html"},"modified":"2024-12-27T12:00:35","modified_gmt":"2024-12-27T04:00:35","slug":"python%e5%a6%82%e4%bd%95%e6%94%b9%e5%8f%98%e6%a0%87%e7%ad%be%e4%bd%8d%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1014909.html","title":{"rendered":"python\u5982\u4f55\u6539\u53d8\u6807\u7b7e\u4f4d\u7f6e"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25094913\/01a3977e-64b4-436b-a9ee-8e13bfe96645.webp\" alt=\"python\u5982\u4f55\u6539\u53d8\u6807\u7b7e\u4f4d\u7f6e\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528Tkinter\u5e93\u3001\u4f7f\u7528matplotlib\u5e93\u3001\u8c03\u6574\u6807\u7b7e\u7684\u4f4d\u7f6e\u5c5e\u6027\u3001\u7075\u6d3b\u4f7f\u7528\u5e03\u5c40\u7ba1\u7406\u5668\u7b49\u65b9\u5f0f\u6765\u6539\u53d8\u6807\u7b7e\u4f4d\u7f6e<\/strong>\u3002\u5176\u4e2d\uff0cTkinter\u548cmatplotlib\u662f\u4e24\u4e2a\u5e38\u7528\u7684\u5e93\uff0c\u5206\u522b\u7528\u4e8e\u521b\u5efa\u56fe\u5f62\u7528\u6237\u754c\u9762\u548c\u7ed8\u5236\u56fe\u5f62\u3002\u5728Tkinter\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u4e0d\u540c\u7684\u5e03\u5c40\u7ba1\u7406\u5668\uff08\u5982pack\u3001grid\u3001place\uff09\u6765\u8c03\u6574\u6807\u7b7e\u7684\u4f4d\u7f6e\uff1b\u800c\u5728matplotlib\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u6807\u7b7e\u7684\u5c5e\u6027\uff08\u5982\u4f4d\u7f6e\u53c2\u6570\uff09\u6765\u6539\u53d8\u5176\u4f4d\u7f6e\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5176\u4e2d\u7684\u4e00\u4e2a\u65b9\u6cd5\uff1a\u4f7f\u7528Tkinter\u7684\u5e03\u5c40\u7ba1\u7406\u5668\u6765\u8c03\u6574\u6807\u7b7e\u7684\u4f4d\u7f6e\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528TKINTER\u5e03\u5c40\u7ba1\u7406\u5668<\/h3>\n<\/p>\n<p><p>Tkinter\u662fPython\u7684\u6807\u51c6GUI\u5e93\uff0c\u975e\u5e38\u9002\u5408\u7528\u4e8e\u521b\u5efa\u7b80\u5355\u7684\u56fe\u5f62\u7528\u6237\u754c\u9762\u3002\u5728Tkinter\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u5e03\u5c40\u7ba1\u7406\u5668\u6765\u8c03\u6574\u6807\u7b7e\u7684\u4f4d\u7f6e\u3002\u4ee5\u4e0b\u662f\u5e38\u7528\u7684Tkinter\u5e03\u5c40\u7ba1\u7406\u5668\uff1a<\/p>\n<\/p>\n<p><h4>1\u3001PACK\u5e03\u5c40\u7ba1\u7406\u5668<\/h4>\n<\/p>\n<p><p>pack()\u662fTkinter\u4e2d\u6700\u7b80\u5355\u7684\u5e03\u5c40\u7ba1\u7406\u5668\uff0c\u53ef\u4ee5\u8ba9\u5f00\u53d1\u8005\u5feb\u901f\u521b\u5efa\u57fa\u672c\u7684\u5e03\u5c40\u3002\u5b83\u901a\u8fc7\u5c06\u63a7\u4ef6\u6cbf\u67d0\u4e00\u65b9\u5411\uff08\u4e0a\u4e0b\u3001\u5de6\u53f3\uff09\u4f9d\u6b21\u6392\u5217\u6765\u5b9e\u73b0\u5e03\u5c40\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import tkinter as tk<\/p>\n<p>root = tk.Tk()<\/p>\n<p>label1 = tk.Label(root, text=&quot;\u6807\u7b7e1&quot;)<\/p>\n<p>label2 = tk.Label(root, text=&quot;\u6807\u7b7e2&quot;)<\/p>\n<p>label1.pack(side=tk.LEFT)<\/p>\n<p>label2.pack(side=tk.RIGHT)<\/p>\n<p>root.m<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>nloop()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u793a\u4f8b\u4e2d\uff0clabel1\u548clabel2\u901a\u8fc7pack()\u65b9\u6cd5\u5206\u522b\u88ab\u653e\u7f6e\u5728\u7a97\u53e3\u7684\u5de6\u4fa7\u548c\u53f3\u4fa7\u3002<\/p>\n<\/p>\n<p><h4>2\u3001GRID\u5e03\u5c40\u7ba1\u7406\u5668<\/h4>\n<\/p>\n<p><p>grid()\u662f\u4e00\u4e2a\u57fa\u4e8e\u884c\u5217\u7684\u5e03\u5c40\u7ba1\u7406\u5668\uff0c\u5141\u8bb8\u5f00\u53d1\u8005\u5c06\u63a7\u4ef6\u653e\u7f6e\u5728\u7f51\u683c\u7684\u7279\u5b9a\u5355\u5143\u4e2d\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import tkinter as tk<\/p>\n<p>root = tk.Tk()<\/p>\n<p>label1 = tk.Label(root, text=&quot;\u6807\u7b7e1&quot;)<\/p>\n<p>label2 = tk.Label(root, text=&quot;\u6807\u7b7e2&quot;)<\/p>\n<p>label1.grid(row=0, column=0)<\/p>\n<p>label2.grid(row=0, column=1)<\/p>\n<p>root.mainloop()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u793a\u4f8b\u4e2d\uff0clabel1\u548clabel2\u88ab\u653e\u7f6e\u5728\u540c\u4e00\u884c\u7684\u4e0d\u540c\u5217\u4e2d\u3002<\/p>\n<\/p>\n<p><h4>3\u3001PLACE\u5e03\u5c40\u7ba1\u7406\u5668<\/h4>\n<\/p>\n<p><p>place()\u662f\u4e00\u4e2a\u57fa\u4e8e\u7edd\u5bf9\u5750\u6807\u7684\u5e03\u5c40\u7ba1\u7406\u5668\uff0c\u5141\u8bb8\u5f00\u53d1\u8005\u901a\u8fc7\u6307\u5b9a\u63a7\u4ef6\u7684x\u548cy\u5750\u6807\u6765\u7cbe\u786e\u5730\u63a7\u5236\u5176\u4f4d\u7f6e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import tkinter as tk<\/p>\n<p>root = tk.Tk()<\/p>\n<p>label1 = tk.Label(root, text=&quot;\u6807\u7b7e1&quot;)<\/p>\n<p>label2 = tk.Label(root, text=&quot;\u6807\u7b7e2&quot;)<\/p>\n<p>label1.place(x=50, y=50)<\/p>\n<p>label2.place(x=150, y=50)<\/p>\n<p>root.mainloop()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u793a\u4f8b\u4e2d\uff0clabel1\u548clabel2\u901a\u8fc7place()\u65b9\u6cd5\u88ab\u653e\u7f6e\u5728\u6307\u5b9a\u7684\u5750\u6807\u4f4d\u7f6e\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001MATPLOTLIB\u6807\u7b7e\u4f4d\u7f6e\u8c03\u6574<\/h3>\n<\/p>\n<p><p>Matplotlib\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u7ed8\u56fe\u5e93\uff0c\u5e7f\u6cdb\u7528\u4e8e\u6570\u636e\u53ef\u89c6\u5316\u3002\u5728matplotlib\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u6807\u7b7e\u7684\u5c5e\u6027\u6765\u6539\u53d8\u5176\u4f4d\u7f6e\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u8bbe\u7f6e\u5750\u6807\u8f74\u6807\u7b7e\u7684\u4f4d\u7f6e<\/h4>\n<\/p>\n<p><p>\u53ef\u4ee5\u901a\u8fc7xlabel()\u548cylabel()\u51fd\u6570\u4e2d\u7684<code>labelpad<\/code>\u53c2\u6570\u6765\u8c03\u6574\u6807\u7b7e\u4e0e\u8f74\u4e4b\u95f4\u7684\u8ddd\u79bb\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import matplotlib.pyplot as plt<\/p>\n<p>plt.plot([1, 2, 3], [4, 5, 6])<\/p>\n<p>plt.xlabel(&quot;X\u8f74\u6807\u7b7e&quot;, labelpad=20)<\/p>\n<p>plt.ylabel(&quot;Y\u8f74\u6807\u7b7e&quot;, labelpad=20)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u8c03\u6574\u56fe\u4f8b\u7684\u4f4d\u7f6e<\/h4>\n<\/p>\n<p><p>\u53ef\u4ee5\u901a\u8fc7<code>loc<\/code>\u53c2\u6570\u6765\u8bbe\u7f6e\u56fe\u4f8b\u7684\u4f4d\u7f6e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import matplotlib.pyplot as plt<\/p>\n<p>plt.plot([1, 2, 3], [4, 5, 6], label=&quot;\u7ebf\u6761&quot;)<\/p>\n<p>plt.legend(loc=&#39;upper left&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u7ed3\u5408\u4f7f\u7528\u4e0d\u540c\u5e03\u5c40\u548c\u4f4d\u7f6e\u5c5e\u6027<\/h3>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u53ef\u80fd\u9700\u8981\u7ed3\u5408\u4f7f\u7528\u4e0d\u540c\u7684\u5e03\u5c40\u7ba1\u7406\u5668\u548c\u4f4d\u7f6e\u5c5e\u6027\u6765\u5b9e\u73b0\u66f4\u52a0\u590d\u6742\u7684\u5e03\u5c40\u6548\u679c\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u6280\u5de7\uff1a<\/p>\n<\/p>\n<p><h4>1\u3001\u4f7f\u7528Frame\u5bb9\u5668<\/h4>\n<\/p>\n<p><p>Frame\u662fTkinter\u4e2d\u7684\u4e00\u79cd\u5bb9\u5668\uff0c\u5141\u8bb8\u5728\u5176\u5185\u90e8\u4f7f\u7528\u4e0d\u540c\u7684\u5e03\u5c40\u7ba1\u7406\u5668\uff0c\u4ece\u800c\u5b9e\u73b0\u590d\u6742\u7684\u5e03\u5c40\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import tkinter as tk<\/p>\n<p>root = tk.Tk()<\/p>\n<p>frame = tk.Frame(root)<\/p>\n<p>frame.pack()<\/p>\n<p>label1 = tk.Label(frame, text=&quot;\u6807\u7b7e1&quot;)<\/p>\n<p>label2 = tk.Label(frame, text=&quot;\u6807\u7b7e2&quot;)<\/p>\n<p>label1.grid(row=0, column=0)<\/p>\n<p>label2.grid(row=0, column=1)<\/p>\n<p>label3 = tk.Label(root, text=&quot;\u6807\u7b7e3&quot;)<\/p>\n<p>label3.pack(side=tk.BOTTOM)<\/p>\n<p>root.mainloop()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u52a8\u6001\u8c03\u6574\u4f4d\u7f6e<\/h4>\n<\/p>\n<p><p>\u53ef\u4ee5\u901a\u8fc7\u7ed1\u5b9a\u4e8b\u4ef6\u6765\u52a8\u6001\u8c03\u6574\u63a7\u4ef6\u7684\u4f4d\u7f6e\u3002\u4f8b\u5982\uff0c\u7a97\u53e3\u5927\u5c0f\u6539\u53d8\u65f6\uff0c\u81ea\u52a8\u8c03\u6574\u63a7\u4ef6\u7684\u4f4d\u7f6e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import tkinter as tk<\/p>\n<p>def resize(event):<\/p>\n<p>    label.place(x=event.width\/\/2, y=event.height\/\/2)<\/p>\n<p>root = tk.Tk()<\/p>\n<p>label = tk.Label(root, text=&quot;\u6807\u7b7e&quot;)<\/p>\n<p>label.place(x=50, y=50)<\/p>\n<p>root.bind(&quot;&lt;Configure&gt;&quot;, resize)<\/p>\n<p>root.mainloop()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u5176\u4ed6\u5e93\u7684\u5e94\u7528<\/h3>\n<\/p>\n<p><p>\u9664\u4e86Tkinter\u548cmatplotlib\uff0cPython\u4e2d\u8fd8\u6709\u5176\u4ed6\u5e93\u53ef\u4ee5\u7528\u4e8e\u6539\u53d8\u6807\u7b7e\u4f4d\u7f6e\u3002\u4f8b\u5982\uff0cPyQt\u548cwxPython\u90fd\u662f\u6d41\u884c\u7684GUI\u5e93\uff0c\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u63a7\u4ef6\u548c\u5e03\u5c40\u9009\u9879\u3002\u4e0b\u9762\u7b80\u8981\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528PyQt\u548cwxPython\u8c03\u6574\u6807\u7b7e\u4f4d\u7f6e\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u4f7f\u7528PYQT\u8c03\u6574\u6807\u7b7e\u4f4d\u7f6e<\/h4>\n<\/p>\n<p><p>PyQt\u662fPython\u7684\u4e00\u4e2a\u8de8\u5e73\u53f0GUI\u5de5\u5177\u5305\uff0c\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u63a7\u4ef6\u548c\u5e03\u5c40\u7ba1\u7406\u5668\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from PyQt5.QtWidgets import QApplication, QLabel, QVBoxLayout, QWidget<\/p>\n<p>app = QApplication([])<\/p>\n<p>window = QWidget()<\/p>\n<p>layout = QVBoxLayout()<\/p>\n<p>label1 = QLabel(&#39;\u6807\u7b7e1&#39;)<\/p>\n<p>label2 = QLabel(&#39;\u6807\u7b7e2&#39;)<\/p>\n<p>layout.addWidget(label1)<\/p>\n<p>layout.addWidget(label2)<\/p>\n<p>window.setLayout(layout)<\/p>\n<p>window.show()<\/p>\n<p>app.exec_()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u4f7f\u7528WXPYTHON\u8c03\u6574\u6807\u7b7e\u4f4d\u7f6e<\/h4>\n<\/p>\n<p><p>wxPython\u662f\u53e6\u4e00\u4e2a\u6d41\u884c\u7684Python GUI\u5e93\uff0c\u63d0\u4f9b\u4e86\u7c7b\u4f3c\u4e8eTkinter\u7684\u5e03\u5c40\u7ba1\u7406\u5668\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import wx<\/p>\n<p>app = wx.App(False)<\/p>\n<p>frame = wx.Frame(None, wx.ID_ANY, &quot;Hello World&quot;)<\/p>\n<p>panel = wx.Panel(frame)<\/p>\n<p>label1 = wx.StaticText(panel, label=&quot;\u6807\u7b7e1&quot;, pos=(10, 10))<\/p>\n<p>label2 = wx.StaticText(panel, label=&quot;\u6807\u7b7e2&quot;, pos=(10, 30))<\/p>\n<p>frame.Show(True)<\/p>\n<p>app.MainLoop()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u65b9\u6cd5\uff0c\u53ef\u4ee5\u7075\u6d3b\u5730\u5728Python\u4e2d\u8c03\u6574\u6807\u7b7e\u7684\u4f4d\u7f6e\u3002\u9009\u62e9\u5408\u9002\u7684\u5e93\u548c\u5e03\u5c40\u7ba1\u7406\u5668\uff0c\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u8005\u521b\u5efa\u76f4\u89c2\u3001\u6613\u7528\u7684\u7528\u6237\u754c\u9762\u3002\u65e0\u8bba\u662f\u7b80\u5355\u7684\u5e94\u7528\u7a0b\u5e8f\u8fd8\u662f\u590d\u6742\u7684\u6570\u636e\u53ef\u89c6\u5316\u9879\u76ee\uff0cPython\u90fd\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u5de5\u5177\u548c\u7075\u6d3b\u7684\u9009\u9879\u6765\u6ee1\u8db3\u5f00\u53d1\u9700\u6c42\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u6539\u53d8\u6807\u7b7e\u7684\u4f4d\u7f6e\uff1f<\/strong><br \/>\u5728\u4f7f\u7528Python\u7684\u56fe\u5f62\u7528\u6237\u754c\u9762\uff08GUI\uff09\u5e93\u65f6\uff0c\u6807\u7b7e\u7684\u4f4d\u7f6e\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u8fdb\u884c\u8c03\u6574\u3002\u5927\u591a\u6570GUI\u6846\u67b6\uff0c\u6bd4\u5982Tkinter\u3001PyQt\u6216wxPython\uff0c\u90fd\u63d0\u4f9b\u4e86\u5e03\u5c40\u7ba1\u7406\u5668\uff0c\u5141\u8bb8\u5f00\u53d1\u8005\u81ea\u7531\u63a7\u5236\u7ec4\u4ef6\u7684\u4f4d\u7f6e\u3002\u4ee5Tkinter\u4e3a\u4f8b\uff0c\u53ef\u4ee5\u4f7f\u7528<code>pack<\/code>\u3001<code>grid<\/code>\u6216<code>place<\/code>\u65b9\u6cd5\u6765\u5b9a\u4f4d\u6807\u7b7e\u3002<code>place<\/code>\u65b9\u6cd5\u5141\u8bb8\u4f60\u7cbe\u786e\u6307\u5b9a\u6807\u7b7e\u7684x\u548cy\u5750\u6807\uff0c\u800c<code>grid<\/code>\u5219\u4f7f\u7528\u884c\u548c\u5217\u7684\u65b9\u5f0f\u8fdb\u884c\u5e03\u5c40\u3002\u901a\u8fc7\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u53ef\u4ee5\u8f7b\u677e\u5730\u6539\u53d8\u6807\u7b7e\u5728\u7a97\u53e3\u4e2d\u7684\u4f4d\u7f6e\u3002<\/p>\n<p><strong>\u4f7f\u7528Tkinter\u65f6\uff0c\u5982\u4f55\u52a8\u6001\u6539\u53d8\u6807\u7b7e\u4f4d\u7f6e\uff1f<\/strong><br \/>\u5728Tkinter\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u66f4\u65b0\u6807\u7b7e\u7684\u5750\u6807\u6765\u52a8\u6001\u6539\u53d8\u5176\u4f4d\u7f6e\u3002\u4f7f\u7528<code>place<\/code>\u65b9\u6cd5\u65f6\uff0c\u53ef\u4ee5\u8c03\u7528<code>place(x=new_x, y=new_y)<\/code>\u6765\u66f4\u65b0\u6807\u7b7e\u7684\u5750\u6807\u3002\u8fd9\u6837\u4e00\u6765\uff0c\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u6309\u94ae\u6216\u5176\u4ed6\u4e8b\u4ef6\u89e6\u53d1\u6807\u7b7e\u4f4d\u7f6e\u7684\u53d8\u5316\uff0c\u4ece\u800c\u5b9e\u73b0\u66f4\u4e3a\u7075\u6d3b\u7684\u754c\u9762\u8bbe\u8ba1\u3002\u786e\u4fdd\u5728\u4e8b\u4ef6\u5904\u7406\u51fd\u6570\u4e2d\u6b63\u786e\u8bbe\u7f6e\u65b0\u5750\u6807\uff0c\u5373\u53ef\u8fbe\u5230\u52a8\u6001\u66f4\u65b0\u7684\u6548\u679c\u3002<\/p>\n<p><strong>\u5728PyQt\u4e2d\u5982\u4f55\u8c03\u6574\u6807\u7b7e\u7684\u4f4d\u7f6e\u548c\u5927\u5c0f\uff1f<\/strong><br \/>\u4f7f\u7528PyQt\u65f6\uff0c\u6807\u7b7e\u7684\u4f4d\u7f6e\u548c\u5927\u5c0f\u53ef\u4ee5\u901a\u8fc7<code>setGeometry()<\/code>\u65b9\u6cd5\u6765\u8c03\u6574\u3002\u8be5\u65b9\u6cd5\u63a5\u53d7\u56db\u4e2a\u53c2\u6570\uff1ax\u5750\u6807\u3001y\u5750\u6807\u3001\u5bbd\u5ea6\u548c\u9ad8\u5ea6\u3002\u4f8b\u5982\uff0c<code>label.setGeometry(50, 50, 100, 30)<\/code>\u5c06\u6807\u7b7e\u7684\u4f4d\u7f6e\u8bbe\u7f6e\u5728\u5750\u6807(50, 50)\uff0c\u5e76\u5c06\u5176\u5927\u5c0f\u8bbe\u7f6e\u4e3a100&#215;30\u50cf\u7d20\u3002\u6b64\u5916\uff0c\u4f7f\u7528\u5e03\u5c40\u7ba1\u7406\u5668\uff08\u5982QVBoxLayout\u6216QHBoxLayout\uff09\u4e5f\u53ef\u4ee5\u5e2e\u52a9\u7ba1\u7406\u6807\u7b7e\u7684\u4f4d\u7f6e\u548c\u5927\u5c0f\uff0c\u4f7f\u754c\u9762\u66f4\u52a0\u6574\u6d01\u548c\u54cd\u5e94\u5f0f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528Tkinter\u5e93\u3001\u4f7f\u7528matplotlib\u5e93\u3001\u8c03\u6574\u6807\u7b7e\u7684\u4f4d\u7f6e\u5c5e\u6027\u3001\u7075\u6d3b\u4f7f\u7528\u5e03\u5c40\u7ba1 [&hellip;]","protected":false},"author":3,"featured_media":1014914,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1014909"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1014909"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1014909\/revisions"}],"predecessor-version":[{"id":1014917,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1014909\/revisions\/1014917"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1014914"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1014909"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1014909"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1014909"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}