{"id":1108264,"date":"2025-01-08T16:58:26","date_gmt":"2025-01-08T08:58:26","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1108264.html"},"modified":"2025-01-08T16:58:29","modified_gmt":"2025-01-08T08:58:29","slug":"%e5%a6%82%e4%bd%95%e7%94%a8python-qt%e8%ae%be%e7%bd%ae%e7%a8%8b%e5%ba%8f%e5%9b%be%e7%89%87%e5%a4%a7%e5%b0%8f","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1108264.html","title":{"rendered":"\u5982\u4f55\u7528python qt\u8bbe\u7f6e\u7a0b\u5e8f\u56fe\u7247\u5927\u5c0f"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25072002\/63059239-5e24-4873-809a-1957fad01b41.webp\" alt=\"\u5982\u4f55\u7528python qt\u8bbe\u7f6e\u7a0b\u5e8f\u56fe\u7247\u5927\u5c0f\" \/><\/p>\n<p><p> \u5728Python\u4e2d\u4f7f\u7528Qt\u8bbe\u7f6e\u7a0b\u5e8f\u56fe\u7247\u5927\u5c0f\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c<strong>\u53ef\u4ee5\u4f7f\u7528QPixmap\u3001QImage\u3001QLabel\u3001\u8c03\u6574\u56fe\u7247\u5927\u5c0f\u7684\u65b9\u6cd5resize()<\/strong>\u3002\u5176\u4e2d\uff0c\u901a\u8fc7QPixmap\u548cQImage\u7684resize()\u65b9\u6cd5\u53ef\u4ee5\u65b9\u4fbf\u5730\u8c03\u6574\u56fe\u7247\u7684\u5927\u5c0f\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528\u8fd9\u4e24\u79cd\u65b9\u6cd5\u6765\u8bbe\u7f6e\u7a0b\u5e8f\u56fe\u7247\u7684\u5927\u5c0f\uff0c\u5e76\u63d0\u4f9b\u4e00\u4e9b\u793a\u4f8b\u4ee3\u7801\u3002<\/p>\n<\/p>\n<p><h2>\u4e00\u3001\u4f7f\u7528QPixmap\u8c03\u6574\u56fe\u7247\u5927\u5c0f<\/h2>\n<\/p>\n<p><p>QPixmap\u662fQt\u4e2d\u7528\u4e8e\u5904\u7406\u56fe\u50cf\u6570\u636e\u7684\u7c7b\u4e4b\u4e00\uff0c\u5b83\u9002\u7528\u4e8e\u5904\u7406\u8f83\u5c0f\u7684\u56fe\u50cf\u3002\u53ef\u4ee5\u901a\u8fc7QPixmap\u7684resize()\u65b9\u6cd5\u6765\u8c03\u6574\u56fe\u7247\u7684\u5927\u5c0f\u3002<\/p>\n<\/p>\n<p><h3>1.1 \u52a0\u8f7d\u5e76\u8c03\u6574\u56fe\u7247<\/h3>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u52a0\u8f7d\u56fe\u7247\u5e76\u8c03\u6574\u5176\u5927\u5c0f\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from PyQt5.QtWidgets import QApplication, QLabel<\/p>\n<p>from PyQt5.QtGui import QPixmap<\/p>\n<p>import sys<\/p>\n<p>app = QApplication(sys.argv)<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2aQLabel\u6765\u663e\u793a\u56fe\u7247<\/strong><\/h2>\n<p>label = QLabel()<\/p>\n<h2><strong>\u52a0\u8f7d\u56fe\u7247<\/strong><\/h2>\n<p>pixmap = QPixmap(&#39;path_to_image.jpg&#39;)<\/p>\n<h2><strong>\u8c03\u6574\u56fe\u7247\u5927\u5c0f<\/strong><\/h2>\n<p>pixmap = pixmap.scaled(200, 200)<\/p>\n<h2><strong>\u5c06\u8c03\u6574\u5927\u5c0f\u540e\u7684\u56fe\u7247\u8bbe\u7f6e\u5230QLabel<\/strong><\/h2>\n<p>label.setPixmap(pixmap)<\/p>\n<h2><strong>\u663e\u793a\u6807\u7b7e<\/strong><\/h2>\n<p>label.show()<\/p>\n<p>sys.exit(app.exec_())<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4ee5\u4e0a\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u52a0\u8f7d\u4e86\u4e00\u5f20\u56fe\u7247\uff0c\u5e76\u4f7f\u7528QPixmap\u7684scaled()\u65b9\u6cd5\u5c06\u5176\u5927\u5c0f\u8c03\u6574\u4e3a200&#215;200\u50cf\u7d20\u3002\u7136\u540e\uff0c\u5c06\u8c03\u6574\u5927\u5c0f\u540e\u7684\u56fe\u7247\u8bbe\u7f6e\u5230QLabel\u4e0a\u8fdb\u884c\u663e\u793a\u3002<\/p>\n<\/p>\n<p><h3>1.2 \u4f7f\u7528\u4fdd\u7559\u7eb5\u6a2a\u6bd4\u7684\u8c03\u6574<\/h3>\n<\/p>\n<p><p>\u6709\u65f6\u5019\uff0c\u6211\u4eec\u5e0c\u671b\u5728\u8c03\u6574\u56fe\u7247\u5927\u5c0f\u65f6\u4fdd\u7559\u5176\u7eb5\u6a2a\u6bd4\u3002\u53ef\u4ee5\u4f7f\u7528scaled()\u65b9\u6cd5\u7684\u7b2c\u4e8c\u4e2a\u53c2\u6570\u6765\u5b9e\u73b0\u8fd9\u4e00\u70b9\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from PyQt5.QtCore import Qt<\/p>\n<h2><strong>\u52a0\u8f7d\u56fe\u7247<\/strong><\/h2>\n<p>pixmap = QPixmap(&#39;path_to_image.jpg&#39;)<\/p>\n<h2><strong>\u4fdd\u7559\u7eb5\u6a2a\u6bd4\uff0c\u8c03\u6574\u56fe\u7247\u5927\u5c0f<\/strong><\/h2>\n<p>pixmap = pixmap.scaled(200, 200, Qt.KeepAspectRatio)<\/p>\n<h2><strong>\u5c06\u8c03\u6574\u5927\u5c0f\u540e\u7684\u56fe\u7247\u8bbe\u7f6e\u5230QLabel<\/strong><\/h2>\n<p>label.setPixmap(pixmap)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4ee5\u4e0a\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528Qt.KeepAspectRatio\u53c2\u6570\u6765\u4fdd\u7559\u56fe\u7247\u7684\u7eb5\u6a2a\u6bd4\u3002<\/p>\n<\/p>\n<p><h2>\u4e8c\u3001\u4f7f\u7528QImage\u8c03\u6574\u56fe\u7247\u5927\u5c0f<\/h2>\n<\/p>\n<p><p>QImage\u662fQt\u4e2d\u53e6\u4e00\u4e2a\u7528\u4e8e\u5904\u7406\u56fe\u50cf\u6570\u636e\u7684\u7c7b\uff0c\u5b83\u9002\u7528\u4e8e\u5904\u7406\u8f83\u5927\u7684\u56fe\u50cf\u3002\u53ef\u4ee5\u901a\u8fc7QImage\u7684scaled()\u65b9\u6cd5\u6765\u8c03\u6574\u56fe\u7247\u7684\u5927\u5c0f\u3002<\/p>\n<\/p>\n<p><h3>2.1 \u52a0\u8f7d\u5e76\u8c03\u6574\u56fe\u7247<\/h3>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u52a0\u8f7d\u56fe\u7247\u5e76\u8c03\u6574\u5176\u5927\u5c0f\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from PyQt5.QtWidgets import QApplication, QLabel<\/p>\n<p>from PyQt5.QtGui import QImage, QPixmap<\/p>\n<p>import sys<\/p>\n<p>app = QApplication(sys.argv)<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2aQLabel\u6765\u663e\u793a\u56fe\u7247<\/strong><\/h2>\n<p>label = QLabel()<\/p>\n<h2><strong>\u52a0\u8f7d\u56fe\u7247<\/strong><\/h2>\n<p>image = QImage(&#39;path_to_image.jpg&#39;)<\/p>\n<h2><strong>\u8c03\u6574\u56fe\u7247\u5927\u5c0f<\/strong><\/h2>\n<p>image = image.scaled(200, 200)<\/p>\n<h2><strong>\u5c06\u8c03\u6574\u5927\u5c0f\u540e\u7684\u56fe\u7247\u8f6c\u6362\u4e3aQPixmap\u5e76\u8bbe\u7f6e\u5230QLabel<\/strong><\/h2>\n<p>label.setPixmap(QPixmap.fromImage(image))<\/p>\n<h2><strong>\u663e\u793a\u6807\u7b7e<\/strong><\/h2>\n<p>label.show()<\/p>\n<p>sys.exit(app.exec_())<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4ee5\u4e0a\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u52a0\u8f7d\u4e86\u4e00\u5f20\u56fe\u7247\uff0c\u5e76\u4f7f\u7528QImage\u7684scaled()\u65b9\u6cd5\u5c06\u5176\u5927\u5c0f\u8c03\u6574\u4e3a200&#215;200\u50cf\u7d20\u3002\u7136\u540e\uff0c\u5c06\u8c03\u6574\u5927\u5c0f\u540e\u7684\u56fe\u7247\u8f6c\u6362\u4e3aQPixmap\uff0c\u5e76\u8bbe\u7f6e\u5230QLabel\u4e0a\u8fdb\u884c\u663e\u793a\u3002<\/p>\n<\/p>\n<p><h3>2.2 \u4f7f\u7528\u4fdd\u7559\u7eb5\u6a2a\u6bd4\u7684\u8c03\u6574<\/h3>\n<\/p>\n<p><p>\u540c\u6837\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528scaled()\u65b9\u6cd5\u7684\u7b2c\u4e8c\u4e2a\u53c2\u6570\u6765\u4fdd\u7559\u56fe\u7247\u7684\u7eb5\u6a2a\u6bd4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from PyQt5.QtCore import Qt<\/p>\n<h2><strong>\u52a0\u8f7d\u56fe\u7247<\/strong><\/h2>\n<p>image = QImage(&#39;path_to_image.jpg&#39;)<\/p>\n<h2><strong>\u4fdd\u7559\u7eb5\u6a2a\u6bd4\uff0c\u8c03\u6574\u56fe\u7247\u5927\u5c0f<\/strong><\/h2>\n<p>image = image.scaled(200, 200, Qt.KeepAspectRatio)<\/p>\n<h2><strong>\u5c06\u8c03\u6574\u5927\u5c0f\u540e\u7684\u56fe\u7247\u8f6c\u6362\u4e3aQPixmap\u5e76\u8bbe\u7f6e\u5230QLabel<\/strong><\/h2>\n<p>label.setPixmap(QPixmap.fromImage(image))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4ee5\u4e0a\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528Qt.KeepAspectRatio\u53c2\u6570\u6765\u4fdd\u7559\u56fe\u7247\u7684\u7eb5\u6a2a\u6bd4\u3002<\/p>\n<\/p>\n<p><h2>\u4e09\u3001\u4f7f\u7528QLabel\u8c03\u6574\u56fe\u7247\u5927\u5c0f<\/h2>\n<\/p>\n<p><p>\u9664\u4e86QPixmap\u548cQImage\uff0c\u6211\u4eec\u8fd8\u53ef\u4ee5\u4f7f\u7528QLabel\u6765\u8c03\u6574\u56fe\u7247\u7684\u5927\u5c0f\u3002QLabel\u53ef\u4ee5\u81ea\u52a8\u8c03\u6574\u56fe\u7247\u7684\u5927\u5c0f\u4ee5\u9002\u5e94\u6807\u7b7e\u7684\u5c3a\u5bf8\u3002<\/p>\n<\/p>\n<p><h3>3.1 \u52a0\u8f7d\u5e76\u8c03\u6574\u56fe\u7247<\/h3>\n<\/p>\n<p><p>\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528QLabel\u7684setScaledContents()\u65b9\u6cd5\u6765\u542f\u7528\u81ea\u52a8\u8c03\u6574\u56fe\u7247\u5927\u5c0f\u7684\u529f\u80fd\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from PyQt5.QtWidgets import QApplication, QLabel<\/p>\n<p>from PyQt5.QtGui import QPixmap<\/p>\n<p>import sys<\/p>\n<p>app = QApplication(sys.argv)<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2aQLabel\u6765\u663e\u793a\u56fe\u7247<\/strong><\/h2>\n<p>label = QLabel()<\/p>\n<h2><strong>\u52a0\u8f7d\u56fe\u7247<\/strong><\/h2>\n<p>pixmap = QPixmap(&#39;path_to_image.jpg&#39;)<\/p>\n<h2><strong>\u5c06\u56fe\u7247\u8bbe\u7f6e\u5230QLabel<\/strong><\/h2>\n<p>label.setPixmap(pixmap)<\/p>\n<h2><strong>\u542f\u7528\u81ea\u52a8\u8c03\u6574\u56fe\u7247\u5927\u5c0f<\/strong><\/h2>\n<p>label.setScaledContents(True)<\/p>\n<h2><strong>\u8bbe\u7f6eQLabel\u7684\u5927\u5c0f<\/strong><\/h2>\n<p>label.resize(200, 200)<\/p>\n<h2><strong>\u663e\u793a\u6807\u7b7e<\/strong><\/h2>\n<p>label.show()<\/p>\n<p>sys.exit(app.exec_())<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4ee5\u4e0a\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u52a0\u8f7d\u4e86\u4e00\u5f20\u56fe\u7247\uff0c\u5e76\u5c06\u5176\u8bbe\u7f6e\u5230QLabel\u4e0a\u3002\u7136\u540e\uff0c\u4f7f\u7528setScaledContents(True)\u65b9\u6cd5\u542f\u7528\u81ea\u52a8\u8c03\u6574\u56fe\u7247\u5927\u5c0f\u7684\u529f\u80fd\u3002\u6700\u540e\uff0c\u901a\u8fc7\u8c03\u6574QLabel\u7684\u5927\u5c0f\u6765\u8c03\u6574\u56fe\u7247\u7684\u5927\u5c0f\u3002<\/p>\n<\/p>\n<p><h2>\u56db\u3001\u603b\u7ed3<\/h2>\n<\/p>\n<p><p>\u5728Python\u4e2d\u4f7f\u7528Qt\u8bbe\u7f6e\u7a0b\u5e8f\u56fe\u7247\u5927\u5c0f\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u9002\u5408\u7684\u65b9\u6cd5\u3002<strong>QPixmap\u9002\u7528\u4e8e\u5904\u7406\u8f83\u5c0f\u7684\u56fe\u50cf\uff0cQImage\u9002\u7528\u4e8e\u5904\u7406\u8f83\u5927\u7684\u56fe\u50cf\uff0cQLabel\u53ef\u4ee5\u81ea\u52a8\u8c03\u6574\u56fe\u7247\u7684\u5927\u5c0f<\/strong>\u3002\u901a\u8fc7\u4f7f\u7528\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u8c03\u6574\u7a0b\u5e8f\u4e2d\u7684\u56fe\u7247\u5927\u5c0f\u3002<\/p>\n<\/p>\n<p><p>\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u80fd\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\u3002\u5982\u679c\u4f60\u5728\u4f7f\u7528Qt\u8fdb\u884c\u56fe\u50cf\u5904\u7406\u65f6\u9047\u5230\u95ee\u9898\uff0c\u53ef\u4ee5\u53c2\u8003\u4ee5\u4e0a\u793a\u4f8b\u4ee3\u7801\uff0c\u6216\u8005\u67e5\u9605Qt\u7684\u5b98\u65b9\u6587\u6863\u83b7\u53d6\u66f4\u591a\u4fe1\u606f\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u4f7f\u7528Python Qt\u8c03\u6574\u7a0b\u5e8f\u7a97\u53e3\u4e2d\u7684\u56fe\u7247\u663e\u793a\u5927\u5c0f\uff1f<\/strong><br \/>\u5728Python Qt\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6eQLabel\u7684pixmap\u5c5e\u6027\u6765\u52a0\u8f7d\u548c\u663e\u793a\u56fe\u7247\u3002\u4f7f\u7528QPixmap\u7684scaled()\u65b9\u6cd5\uff0c\u53ef\u4ee5\u6839\u636e\u6307\u5b9a\u7684\u5bbd\u5ea6\u548c\u9ad8\u5ea6\u8c03\u6574\u56fe\u7247\u7684\u5927\u5c0f\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">from PyQt5.QtWidgets import QApplication, QLabel\nfrom PyQt5.QtGui import QPixmap\nimport sys\n\napp = QApplication(sys.argv)\nlabel = QLabel()\npixmap = QPixmap(&#39;path_to_image.jpg&#39;)\nscaled_pixmap = pixmap.scaled(200, 100)  # \u8bbe\u7f6e\u5bbd\u5ea6\u4e3a200\uff0c\u9ad8\u5ea6\u4e3a100\nlabel.setPixmap(scaled_pixmap)\nlabel.show()\nsys.exit(app.exec_())\n<\/code><\/pre>\n<p>\u6b64\u4ee3\u7801\u5c06\u52a0\u8f7d\u5e76\u663e\u793a\u4e00\u5f20\u8c03\u6574\u540e\u7684\u56fe\u7247\u3002<\/p>\n<p><strong>\u5728Python Qt\u4e2d\uff0c\u5982\u4f55\u4fdd\u6301\u56fe\u7247\u7684\u7eb5\u6a2a\u6bd4\u540c\u65f6\u8c03\u6574\u5927\u5c0f\uff1f<\/strong><br \/>\u8981\u5728\u8c03\u6574\u56fe\u7247\u5927\u5c0f\u65f6\u4fdd\u6301\u5176\u7eb5\u6a2a\u6bd4\uff0c\u53ef\u4ee5\u4f7f\u7528QPixmap\u7684scaled()\u65b9\u6cd5\uff0c\u8bbe\u7f6e\u6bd4\u4f8b\u53c2\u6570\u4e3aQt.KeepAspectRatio\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">scaled_pixmap = pixmap.scaled(200, 100, aspectRatioMode=Qt.KeepAspectRatio)\n<\/code><\/pre>\n<p>\u8fd9\u6837\uff0c\u65e0\u8bba\u8bbe\u5b9a\u7684\u5bbd\u5ea6\u548c\u9ad8\u5ea6\u662f\u591a\u5c11\uff0c\u56fe\u7247\u90fd\u4f1a\u6309\u6bd4\u4f8b\u7f29\u653e\uff0c\u4ee5\u514d\u5931\u771f\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python Qt\u5e94\u7528\u7a0b\u5e8f\u4e2d\u52a8\u6001\u6539\u53d8\u56fe\u7247\u5927\u5c0f\uff1f<\/strong><br \/>\u53ef\u4ee5\u901a\u8fc7\u4fe1\u53f7\u4e0e\u69fd\u673a\u5236\u6765\u5b9e\u73b0\u52a8\u6001\u6539\u53d8\u56fe\u7247\u5927\u5c0f\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u8fde\u63a5\u6309\u94ae\u7684clicked\u4fe1\u53f7\u5230\u4e00\u4e2a\u81ea\u5b9a\u4e49\u69fd\uff0c\u5728\u69fd\u4e2d\u91cd\u65b0\u8bbe\u7f6e\u56fe\u7247\u7684\u5927\u5c0f\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u793a\u4f8b\uff1a  <\/p>\n<pre><code class=\"language-python\">from PyQt5.QtWidgets import QApplication, QPushButton, QVBoxLayout, QWidget, QLabel\nfrom PyQt5.QtGui import QPixmap\nimport sys\n\nclass MyWindow(QWidget):\n    def __init__(self):\n        super().__init__()\n        self.label = QLabel()\n        self.button = QPushButton(&#39;Resize Image&#39;)\n        self.button.clicked.connect(self.resize_image)\n        layout = QVBoxLayout()\n        layout.addWidget(self.label)\n        layout.addWidget(self.button)\n        self.setLayout(layout)\n        \n        self.pixmap = QPixmap(&#39;path_to_image.jpg&#39;)\n        self.label.setPixmap(self.pixmap)\n\n    def resize_image(self):\n        new_pixmap = self.pixmap.scaled(150, 150, aspectRatioMode=Qt.KeepAspectRatio)\n        self.label.setPixmap(new_pixmap)\n\napp = QApplication(sys.argv)\nwindow = MyWindow()\nwindow.show()\nsys.exit(app.exec_())\n<\/code><\/pre>\n<p>\u901a\u8fc7\u70b9\u51fb\u6309\u94ae\uff0c\u7528\u6237\u53ef\u4ee5\u52a8\u6001\u8c03\u6574\u56fe\u7247\u7684\u5927\u5c0f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u4f7f\u7528Qt\u8bbe\u7f6e\u7a0b\u5e8f\u56fe\u7247\u5927\u5c0f\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u53ef\u4ee5\u4f7f\u7528QPixmap\u3001QImage\u3001QLabel\u3001\u8c03\u6574 [&hellip;]","protected":false},"author":3,"featured_media":1108274,"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\/1108264"}],"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=1108264"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1108264\/revisions"}],"predecessor-version":[{"id":1108275,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1108264\/revisions\/1108275"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1108274"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1108264"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1108264"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1108264"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}