{"id":614,"date":"2020-01-11T23:42:17","date_gmt":"2020-01-11T15:42:17","guid":{"rendered":"http:\/\/www.mustenaka.cn\/?p=614"},"modified":"2020-01-11T23:42:47","modified_gmt":"2020-01-11T15:42:47","slug":"pyqtbegin2","status":"publish","type":"post","link":"https:\/\/www.mustenaka.cn\/index.php\/2020\/01\/11\/pyqtbegin2\/","title":{"rendered":"PyQt\u5165\u95e80-\u8ba4\u8bc6PyQt"},"content":{"rendered":"<p><span>PyQt5\u662f\u57fa\u4e8eDigia\u516c\u53f8\u5f3a\u5927\u7684\u56fe\u5f62\u7a0b\u5f0f\u6846\u67b6Qt5\u7684python\u63a5\u53e3\uff0c\u7531\u4e00\u7ec4python\u6a21\u5757\u6784\u6210\u3002PyQt5\u672c\u8eab\u62e5\u6709\u8d85\u8fc7620\u4e2a\u7c7b\u548c6000\u51fd\u6570\u53ca\u65b9\u6cd5\u3002\u5728\u53ef\u4ee5\u8fd0\u884c\u4e8e\u591a\u4e2a\u5e73\u53f0\uff0c\u5305\u62ec\uff1aUnix, Windows, and Mac OS\u3002\u652f\u6301Python2\u548cPython3\uff0c\u5f53\u7136\u968f\u7740\u65f6\u95f4\u63a8\u79fb\uff0c\u8fd8\u662f\u5168\u9762\u62e5\u62b1Py3\u5427\u3002<\/span><\/p>\n<p><!--more--><\/p>\n<p>PyQT5\u4e2d\u5305\u542b\u4e86\u5982\u4e0b\u6a21\u5757<\/p>\n<blockquote>\n<ol>\n<li><b>QtCore\u6a21\u5757<\/b>\u6db5\u76d6\u4e86\u5305\u7684\u6838\u5fc3\u7684\u975eGUI\u529f\u80fd\uff0c\u6b64\u6a21\u5757\u88ab\u7528\u4e8e\u5904\u7406\u7a0b\u5e8f\u4e2d\u6d89\u53ca\u5230\u7684 time\u3001\u6587\u4ef6\u3001\u76ee\u5f55\u3001\u6570\u636e\u7c7b\u578b\u3001\u6587\u672c\u6d41\u3001\u94fe\u63a5\u3001mime\u3001\u7ebf\u7a0b\u6216\u8fdb\u7a0b\u7b49\u5bf9\u8c61\u3002<\/li>\n<li><b>QtGui\u6a21\u5757<\/b>\u6db5\u76d6\u591a\u79cd\u57fa\u672c\u56fe\u5f62\u529f\u80fd\u7684\u7c7b; \u5305\u62ec\u4f46\u4e0d\u9650\u4e8e\uff1a\u7a97\u53e3\u96c6\u3001\u4e8b\u4ef6\u5904\u7406\u30012D\u56fe\u5f62\u3001\u57fa\u672c\u7684\u56fe\u50cf\u548c\u754c\u9762 \u548c\u5b57\u4f53\u6587\u672c\u3002<\/li>\n<li><b>QtWidgets\u6a21\u5757<\/b>\u5305\u542b\u4e86\u4e00\u6574\u5957UI\u5143\u7d20\u7ec4\u4ef6\uff0c\u7528\u4e8e\u5efa\u7acb\u7b26\u5408\u7cfb\u7edf\u98ce\u683c\u7684classic\u754c\u9762\uff0c\u975e\u5e38\u65b9\u4fbf\uff0c\u53ef\u4ee5\u5728\u5b89\u88c5\u65f6\u9009\u62e9\u662f\u5426\u4f7f\u7528\u6b64\u529f\u80fd\u3002<\/li>\n<li><b>QtMultimedia\u6a21\u5757<\/b>\u5305\u542b\u4e86\u4e00\u5957\u7c7b\u5e93\uff0c\u8be5\u7c7b\u5e93\u88ab\u7528\u4e8e\u5904\u7406\u591a\u5a92\u4f53\u4e8b\u4ef6\uff0c\u901a\u8fc7\u8c03\u7528API\u63a5\u53e3\u8bbf\u95ee\u6444\u50cf\u5934\u3001\u8bed\u97f3\u8bbe\u5907\u3001\u6536\u53d1\u6d88\u606f\uff08radio functionality\uff09\u7b49\u3002<\/li>\n<li><b>QtBluetooth\u6a21\u5757<\/b>\u5305\u542b\u4e86\u5904\u7406\u84dd\u7259\u6d3b\u52a8\u7684\u7c7b\u5e93\uff0c\u5b83\u7684\u529f\u80fd\u5305\u62ec\uff1a\u626b\u63cf\u8bbe\u5907\u3001\u8fde\u63a5\u3001\u4ea4\u4e92\u7b49\u884c\u4e3a\u3002<\/li>\n<li><b>QtNetwork\u6a21\u5757<\/b>\u5305\u542b\u7528\u4e8e\u7f51\u7edc\u7f16\u7a0b\u7684\u7c7b\u5e93\uff0c\u8fd9\u7ec4\u7c7b\u7a0b\u5e8f\u901a\u8fc7\u63d0\u4f9b\u4fbf\u6377\u7684TCP\/IP \u53ca UDP \u7684 c\/s \u7a0b\u5f0f\u7801\u96c6\u5408\uff0c\u4f7f\u5f97\u57fa\u4e8eQt\u7684\u7f51\u7edc\u7f16\u7a0b\u66f4\u5bb9\u6613\u3002<\/li>\n<li><b>QtPositioning\u6a21\u5757<\/b>\u7528\u4e8e\u83b7\u53d6\u4f4d\u7f6e\u4fe1\u606f\uff0c\u6b64\u6a21\u5757\u5141\u8bb8\u4f7f\u7528\u591a\u79cd\u65b9\u5f0f\u8fbe\u6210\u5b9a\u4f4d\uff0c\u5305\u62ec\u4f46\u4e0d\u9650\u4e8e\uff1a\u536b\u661f\u3001\u65e0\u7ebf\u7f51\u3001\u6587\u5b57\u4fe1\u606f\u3002\u6b64\u5e94\u7528\u4e00\u822c\u7528\u4e8e\u7f51\u7edc\u5730\u56fe\u5b9a\u4f4d\u7cfb\u7edf\u3002<\/li>\n<li><b>Enginio\u6a21\u5757<\/b>\u7528\u4e8e\u6784\u5efa\u5ba2\u6237\u7aef\u7684\u5e94\u7528\u7a0b\u5f0f\u5e93\uff0c\u7528\u4e8e\u5728\u8fd0\u884c\u65f6\u8bbf\u95ee Qt Cloud \u670d\u52a1\u5668\u6258\u7ba1\u7684\u5e94\u7528\u7a0b\u5e8f\u3002<\/li>\n<li><b>QtWebSockets\u6a21\u5757<\/b>\u5305\u542b\u4e86\u4e00\u7ec4\u7c7b\u7a0b\u5e8f\uff0c\u7528\u4ee5\u5b9e\u73b0websocket\u534f\u8bae\u3002<\/li>\n<li><b>QtWebKit<\/b>\u5305\u542b\u4e86\u7528\u4e8e\u5b9e\u73b0\u57fa\u4e8ewebkit2\u7684\u7f51\u7edc\u6d4f\u89c8\u5668\u7684\u7c7b\u5e93\u3002<\/li>\n<li><b>QtWebKitWidgets\u6a21\u5757<\/b>\u5305\u542b\u7528\u4e8e\u57fa\u4e8eWebKit1\u7684Web\u6d4f\u89c8\u5668\u5b9e\u73b0\u7684\u7c7b\uff0c\u7528\u4e8e\u57fa\u4e8eQtWidgets\u7684\u5e94\u7528\u7a0b\u5e8f<\/li>\n<li><b>QtXml\u6a21\u5757<\/b>\u5305\u542b\u4e86\u7528\u4e8e\u5904\u7406XML\u7684\u7c7b\u5e93\uff0c\u6b64\u6a21\u5757\u4e3aSAX\u548cDOM API \u7684\u5b9e\u73b0\u63d0\u4f9b\u4e86\u65b9\u6cd5\u3002<\/li>\n<li><b>QtSvg\u6a21\u5757<\/b>\u901a\u8fc7\u4e00\u7ec4\u7c7b\uff0c\u4e3a\u663e\u793a\u77e2\u91cf\u56fe\u5f62\u6587\u4ef6\u7684\u5185\u5bb9\u63d0\u4f9b\u4e86\u65b9\u6cd5\u3002<\/li>\n<li><b>QtSql\u6a21\u5757<\/b>\u63d0\u4f9b\u4e86\u6570\u636e\u5e93\u5bf9\u8c61\u7684\u63a5\u53e3\u4ee5\u4f9b\u4f7f\u7528<\/li>\n<li><b>QtTest\u6a21\u5757<\/b>\u5305\u542b\u4e86\u53ef\u4ee5\u901a\u8fc7\u5355\u5143\u6d4b\u8bd5\uff0c\u4ee5\u8c03\u8bd5PyQt5\u5e94\u7528\u7a0b\u5f0f\u7684\u529f\u80fd\u3002<\/li>\n<\/ol>\n<\/blockquote>\n<p>\u4e00\u822c\u800c\u8a00\u6211\u4eec\u8fdb\u884c\u7684\u56fe\u5f62\u754c\u9762\u8bbe\u8ba1\uff0c\u4f1a\u9ed8\u8ba4\u4f7f\u7528\u5982\u4e0b\u51e0\u4e2a\u6a21\u5757\u3010\u6ce8\u610fPyQt5\u5e76\u4e0d\u5411\u4e0b\u517c\u5bb9PyQt4\u3011<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\" python=\"\">from PyQt5 import QtCore, QtGui, QtWidgets<\/code><\/pre>\n<p>\u5b83\u4e3b\u8981\u8fd8\u6709\u4e00\u4e2adesigner\u7684\u8bbe\u8ba1\u6a21\u5757\u8fdb\u884c\u56fe\u5f62\u5316\u7684\u8bbe\u8ba1\uff0c\u9700\u8981\u7528\u4ee3\u7801\u8fdb\u884c\u8c03\u7528<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PyQt5\u662f\u57fa\u4e8eDigia\u516c\u53f8\u5f3a\u5927\u7684\u56fe\u5f62\u7a0b\u5f0f\u6846\u67b6Qt5\u7684python\u63a5\u53e3\uff0c\u7531\u4e00\u7ec4python\u6a21\u5757\u6784\u6210 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30,13,3],"tags":[65,31,40],"class_list":["post-614","post","type-post","status-publish","format-standard","hentry","category-python","category-vscode","category-buildblog","tag-pyqt","tag-python","tag-qt"],"views":1360,"_links":{"self":[{"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/posts\/614","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/comments?post=614"}],"version-history":[{"count":2,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/posts\/614\/revisions"}],"predecessor-version":[{"id":616,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/posts\/614\/revisions\/616"}],"wp:attachment":[{"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/media?parent=614"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/categories?post=614"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/tags?post=614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}