{"id":459522,"date":"2025-05-13T21:00:13","date_gmt":"2025-05-13T21:00:13","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=459522"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=459522","title":{"rendered":"<span>Qt for Python: PySide6<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/313\/0f4\/40e\/3130f440e5983cc628762ffe0a85e15a.png\" alt=\"alt\" title=\"\u041b\u043e\u0433\u043e\u0442\u0438\u043f Qt\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/\/post_images\/313\/0f4\/40e\/3130f440e5983cc628762ffe0a85e15a.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/313\/0f4\/40e\/3130f440e5983cc628762ffe0a85e15a.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041b\u043e\u0433\u043e\u0442\u0438\u043f Qt<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u043f\u044b\u0442\u0430\u044e\u0441\u044c \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0430\u043c \u043e \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 PySide (\u043a\u043e\u0442\u043e\u0440\u0430\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0438\u043d\u0434\u0438\u043d\u0433\u043e\u043c Qt) \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Python.<\/p>\n<p>\u0422\u0430\u043a \u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u043d\u0435\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u043e\u0433 &#8212; PyQt. \u042f \u043d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u043c\u043d\u043e\u0433\u0438\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0430\u044f \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u044f \u0434\u043b\u044f \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f (GPL, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 LGPL), \u0430 \u0442\u0430\u043a \u0436\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432.<\/p>\n<p>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0430\u043c\u0443\u044e \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e PySide6 (\u043f\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044e \u043d\u0430 2025 \u0433\u043e\u0434) \u0438 Python \u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430<\/p>\n<p>\u0422\u0430\u043a \u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 PySide:<\/p>\n<ul>\n<li>\n<p>PySide1 (Qt 4)<\/p>\n<\/li>\n<li>\n<p>PySide2 (Qt 5)<\/p>\n<\/li>\n<li>\n<p>PySide6 (Qt 6) \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f<\/p>\n<\/li>\n<\/ul>\n<h4>\u041d\u0430\u043c \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f:<\/h4>\n<ul>\n<li>\n<p>Python (<a href=\"https:\/\/www.python.org\/downloads\/\" rel=\"noopener noreferrer nofollow\">https:\/\/www.python.org\/downloads\/<\/a>)<\/p>\n<\/li>\n<li>\n<p>\u0423\u0434\u043e\u0431\u043d\u0430\u044f IDE\/\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043a\u043e\u0434\u0430 (Visual Studio Code \u0438\u043b\u0438 PyCharm)<\/p>\n<\/li>\n<li>\n<p>\u0421\u0430\u043c PySide6 &#8212; \u00abpip install PySide6\u00bb<\/p>\n<\/li>\n<li>\n<p>\u0417\u043d\u0430\u043d\u0438\u044f \u041e\u041e\u041f (\u0445\u043e\u0442\u044f\u0431\u044b \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435)<\/p>\n<\/li>\n<\/ul>\n<h4>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/h4>\n<p>\u041f\u0435\u0440\u0435\u0434 \u043d\u0430\u0447\u0430\u043b\u043e\u043c \u043f\u043e\u0434\u0435\u043b\u044e\u0441\u044c \u0441\u0441\u044b\u043b\u043a\u043e\u0439 \u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439, \u0435\u0441\u043b\u0438 \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f \u043a\u0430\u043a\u0438\u0435-\u043b\u0438\u0431\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u043e\u0442\u0432\u0435\u0442\u044b \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u0442 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<ul>\n<li>\n<p>Qt for Python (PySide6) &#8212; <a href=\"https:\/\/doc.qt.io\/qtforpython-6\/\" rel=\"noopener noreferrer nofollow\">https:\/\/doc.qt.io\/qtforpython-6\/<\/a><\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f Qt &#8212; <a href=\"https:\/\/doc.qt.io\/\" rel=\"noopener noreferrer nofollow\">https:\/\/doc.qt.io\/<\/a><\/p>\n<\/li>\n<li>\n<p>Qt Wiki &#8212; <a href=\"https:\/\/wiki.qt.io\/Main\" rel=\"noopener noreferrer nofollow\">https:\/\/wiki.qt.io\/Main<\/a><\/p>\n<\/li>\n<\/ul>\n<h3>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c!<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 PySide6 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044e.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Qt \u0432 \u0446\u0435\u043b\u043e\u043c.<\/p>\n<blockquote>\n<p>Qt \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u0430, \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u0438 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432. \u041e\u043d \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u043d\u0435 \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u044f\u0441\u044c \u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b.<\/p>\n<\/blockquote>\n<p>\u0421\u0430\u043c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 Qt \u0441\u043e\u0437\u0434\u0430\u043d \u0434\u043b\u044f C++ \u0430 PySide6 \u0438\u0441\u043f\u043e\u043b\u044c\u043d\u044f\u0435\u0442 \u0440\u043e\u043b\u044c &#171;\u0431\u0438\u043d\u0434\u0438\u043d\u0433\u0430&#187; (\u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438) \u0442\u043e \u0435\u0441\u0442\u044c \u043c\u044b \u043f\u0438\u0448\u0435\u043c \u043d\u0430 Python \u0430 \u0441\u0430\u043c\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 \u0421++ (\u0432\u043d\u0443\u0442\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/doc.qt.io\/qtforpython-6\/shiboken6\/index.html\" rel=\"noopener noreferrer nofollow\">shiboken6<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c C++ \u043a\u043e\u0434 \u0432 Python)<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/203\/37c\/471\/20337c471bf3bd5807d39ba5b7c8e2ad.png\" alt=\"alt\" title=\"\u041b\u043e\u0433\u043e\u0442\u0438\u043f Qt for Python\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/\/post_images\/203\/37c\/471\/20337c471bf3bd5807d39ba5b7c8e2ad.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/203\/37c\/471\/20337c471bf3bd5807d39ba5b7c8e2ad.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041b\u043e\u0433\u043e\u0442\u0438\u043f Qt for Python<\/figcaption><\/div>\n<\/figure>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Qt \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<br \/> \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0442\u0430\u043a\u0438\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f:<\/p>\n<ul>\n<li>\n<p>Telegram (!)<\/p>\n<\/li>\n<li>\n<p>qBittorrent<\/p>\n<\/li>\n<li>\n<p>VLC Media Player<\/p>\n<\/li>\n<li>\n<p>OBS Studio<\/p>\n<\/li>\n<li>\n<p>VirtualBox<\/p>\n<\/li>\n<li>\n<p>\u0438 \u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u0445<\/p>\n<\/li>\n<\/ul>\n<p>* \u0421\u0442\u043e\u0438\u0442 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0447\u0442\u043e \u043e\u043d\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u043c C++\/Qt \u0430 \u043d\u0435 Python\/Qt<\/p>\n<h3>Hello, World!<\/h3>\n<p>\u041d\u0443 \u0447\u0442\u043e \u0436\u0435, \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<blockquote>\n<p><strong>\u0421\u043e\u0432\u0435\u0442:<\/strong> \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u00ab<a href=\"https:\/\/doc.qt.io\/qtforpython-6\/tools\/pyside-project.html\" rel=\"noopener noreferrer nofollow\">pyside6-project<\/a>\u00bb \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 PySide6 \u0441 \u0433\u043e\u0442\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432<\/p>\n<\/blockquote>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<br \/> \u0421\u043e\u0437\u0434\u0430\u044e \u043f\u0430\u043f\u043a\u0443 testapp \u0432 \u043d\u0435\u0439 main.py<\/p>\n<p>\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443<\/p>\n<pre><code>from PySide6.QtWidgets import QApplication, QLabel  app = QApplication()  label = QLabel(\"Hello, World!\") label.show()  app.exec() <\/code><\/pre>\n<blockquote>\n<p><strong>\u0421\u043e\u0432\u0435\u0442:<\/strong> \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430\u0445 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0442\u0430\u0440\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 sys.exit(app.exec()), QApplication(sys.argv), \u0438 \u0442.\u0434. \u0412 \u043d\u043e\u0432\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 Qt \u0434\u0430\u043d\u043d\u044b\u0435 \u0442\u0435\u043b\u043e\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f, \u0432\u0441\u0451 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438.<\/p>\n<\/blockquote>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u043a\u043d\u043e \u0441 \u043d\u0430\u0434\u043f\u0438\u0441\u044c\u044e Hello, World!<br \/> \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (QApplication), \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a \u043d\u0435\u043c\u0443 \u0432\u0438\u0434\u0436\u0435\u0442 &#171;label&#187; (\u0442\u0435\u043a\u0441\u0442), \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u044d\u0442\u043e\u0442 \u0432\u0438\u0434\u0436\u0435\u0442 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<br \/> \u041f\u043e\u0437\u0436\u0435 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e QMainWindow, QWidget \u0438 centralWidget.<\/p>\n<h3>Qt Designer<\/h3>\n<h4>pyside6-designer<\/h4>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/0fb\/39a\/83e\/0fb39a83ee67f50315808db885472321.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/\/post_images\/0fb\/39a\/83e\/0fb39a83ee67f50315808db885472321.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/0fb\/39a\/83e\/0fb39a83ee67f50315808db885472321.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>Qt Designer \u2014 \u044d\u0442\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 (GUI) \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Qt. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u043a\u043d\u0430, \u0444\u043e\u0440\u043c\u044b \u0438 \u0432\u0438\u0434\u0436\u0435\u0442\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e drag-and-drop, \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<\/p>\n<p>\u0414\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043e\u043a\u043d\u0430 \u0438 \u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0433\u043e, \u0447\u0435\u0433\u043e \u0434\u0430\u0436\u0435 \u044f \u043d\u0435 \u0437\u043d\u0430\u044e<\/p>\n<blockquote>\n<p><strong>\u0421\u043e\u0432\u0435\u0442:<\/strong> \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0442\u0435\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (\u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0435\u043b\u0443\u044e \u0438 \u0447\u0435\u0440\u043d\u0443\u044e, \u0430 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 -style (\u043f\u0440\u0438\u043c\u0435\u0440: pyside6-designer -style WindowsVista). \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u0441\u0442\u0438\u043b\u0438 \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043f\u043e\u0437\u0436\u0435.<\/p>\n<\/blockquote>\n<p>\u042f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0435 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 PySide6 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0443 pyside6-designer, \u044d\u0442\u043e \u044f\u0440\u043b\u044b\u043a. \u041d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0432\u0430\u0448\u0435\u0439 \u043f\u0430\u043f\u043a\u0435 site-packages\/PySide6\/designer.exe<\/p>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442 Qt, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0442\u0430\u043a \u0436\u0435 \u0435\u0441\u0442\u044c IDE \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 Qt \u043f\u0440\u0438\u043b\u043e\u0436\u043d\u0438\u0439 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 Python &#8212; Qt Creator. \u0415\u0441\u043b\u0438 \u0447\u0435\u0441\u0442\u043d\u043e, \u043c\u043d\u0435 \u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u0434\u0430\u043d\u043d\u0430\u044f \u0438\u0434\u0435\u044f. \u041f\u0430\u043a\u0435\u0442 PySide6 \u0438\u043c\u0435\u0435\u0442 <strong>\u0432\u0441\u0451<\/strong> \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e.<\/p>\n<p>\u0415\u0449\u0451 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 &#8212; <a href=\"https:\/\/build-system.fman.io\/qt-designer-download\" rel=\"noopener noreferrer nofollow\">https:\/\/build-system.fman.io\/qt-designer-download<\/a><\/p>\n<h4>QMainWindow (\u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u043e\u043a\u043d\u043e)<\/h4>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/51a\/e38\/c79\/51ae38c79f85e05d1ab4dde0381daefe.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/\/post_images\/51a\/e38\/c79\/51ae38c79f85e05d1ab4dde0381daefe.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/51a\/e38\/c79\/51ae38c79f85e05d1ab4dde0381daefe.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u043e\u043a\u043d\u043e \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u0430\u0441\u0441\u0430 QMainWindow, \u0432\u043d\u0443\u0442\u0440\u044c \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u043a\u043d\u0430 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0432\u0438\u0434\u0436\u0435\u0442 &#8212; centralWidget \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u044b, \u043a\u043d\u043e\u043f\u043a\u0438, \u043c\u0435\u043d\u044e, \u0438 \u0432\u0441\u0451 \u0447\u0442\u043e \u0432\u044b \u0442\u0443\u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0435.<\/p>\n<blockquote>\n<p><strong>\u0421\u043e\u0432\u0435\u0442:<\/strong> \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Hello, World! \u043c\u044b   \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438 \u043e\u043a\u043d\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438 \u0432\u0438\u0434\u0436\u0435\u0442. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0432\u0438\u0434\u0436\u0435\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e (\u043d\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u043d\u043e, \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f) \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u043a\u043d\u043e, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043c\u0435\u0449\u0430\u0442\u044c\u0441\u044f \u0432\u0430\u0448\u0438 \u0432\u0438\u0434\u0436\u0435\u0442\u044b (\u043b\u0443\u0447\u0448\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442)<\/p>\n<\/blockquote>\n<p>QWidget \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u044b, \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0432\u0438\u0434\u0436\u0435\u0442\u0430\u043c\u0438, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u0438 \u0442.\u0434.<\/p>\n<p>QCentralWidget \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442 QWidget \u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0433\u043b\u0430\u0432\u043d\u044b\u043c \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u043c \u043e\u043a\u043d\u0430. \u0414\u043b\u044f \u043d\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Layout (QLayout \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u0449\u0438\u043a) \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0433\u0430\u0442\u044c \u0432\u0438\u0434\u0436\u0435\u0442\u044b \u0438 \u0434\u0430\u0451\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u043e\u043a\u043d\u0430.<\/p>\n<blockquote>\n<p><strong>\u0421\u043e\u0432\u0435\u0442:<\/strong> \u0435\u0441\u043b\u0438 \u0432\u044b \u0432\u044b\u0431\u0438\u0440\u0438\u0442\u0435 QWidget \u043a\u0430\u043a \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u043e\u043a\u043d\u043e \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0442\u043e \u0432\u044b \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043e\u043a\u043d\u0430, \u0438\u043a\u043e\u043d\u043a\u0443, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 QMainWindow<\/p>\n<\/blockquote>\n<p>\u0422\u0430\u043a \u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 menuBar. \u041a\u0430\u043a \u0432\u0441\u0435 \u043f\u0440\u0438\u0432\u044b\u043a\u043b\u0438 &#8212; \u0424\u0430\u0439\u043b, \u041f\u0440\u0430\u0432\u043a\u0430, \u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430. \u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0435 \u043c\u0435\u043d\u044e \u0432\u0432\u0435\u0440\u0445\u0443 \u043e\u043a\u043d\u0430.<br \/> \u0412\u043d\u0438\u0437\u0443 &#8212; statusBar \u0433\u0434\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u0435\u0449\u0430\u0442\u044c\u0441\u044f \u0440\u0430\u0437\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f.<br \/> toolBar &#8212; \u043f\u0430\u043d\u0435\u043b\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0433\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0447\u0442\u043e-\u0442\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>DockWidget \u2014 \u044d\u0442\u043e \u0432\u0438\u0434\u0436\u0435\u0442 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f &#171;\u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0438\u0445&#187; \u043f\u0430\u043d\u0435\u043b\u0435\u0439 \u0432\u043e\u043a\u0440\u0443\u0433 \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u043e\u043a\u043d\u0430. \u0422\u0430\u043a\u0438\u0435 \u043f\u0430\u043d\u0435\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0442\u044c, \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u044f\u0442\u044c \u0441\u0431\u043e\u043a\u0443, \u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0438 \u0441\u043d\u043e\u0432\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/70c\/6d5\/d82\/70c6d5d828da5616af7a7c5bf0837840.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/\/post_images\/70c\/6d5\/d82\/70c6d5d828da5616af7a7c5bf0837840.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/70c\/6d5\/d82\/70c6d5d828da5616af7a7c5bf0837840.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h4>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Qt Designer<\/h4>\n<p>\u0417\u0430\u0445\u043e\u0434\u0438\u043c, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b (MainWindow), \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u00ab\u0421\u043e\u0437\u0434\u0430\u0442\u044c\u00bb. \u041f\u043e\u043f\u0430\u0434\u0430\u0435\u043c \u0432 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u043e\u043a\u043d\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430. \u0421\u043b\u0435\u0432\u0430 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442 \u043e\u043a\u043d\u043e \u0441 \u0432\u0438\u0434\u0436\u0435\u0442\u0430\u043c\u0438, \u0441\u043f\u0440\u0430\u0432\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c \u044d\u0442\u0438 \u043f\u0430\u043d\u0435\u043b\u0438 \u043a\u0430\u043a \u0445\u043e\u0442\u0438\u0442\u0435, \u0430 \u0442\u0430\u043a \u0436\u0435 \u0443\u0431\u0438\u0440\u0430\u0442\u044c \u0438\u0445.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430<\/p>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c QLayout \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430 \u0446\u0435\u043d\u0442\u0440, \u0430 QPushButton \u0432\u043d\u0438\u0437. \u0421\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438 \u0434\u043b\u044f centralWidget \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c layout \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u0430\u043d\u0435\u043b\u044c \u0441\u043b\u0435\u0432\u0430 \u0432\u0432\u0435\u0440\u0445\u0443 (\u043f\u0430\u043d\u0435\u043b\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432). \u041c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e, \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>\u0424\u043e\u0440\u043c\u0430 -&gt; \u041f\u0440\u0435\u0434\u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440. \u0412\u0438\u0434\u0438\u043c \u043a\u0430\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442. \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c .ui \u0432 \u043f\u0430\u043f\u043a\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<h4>.ui \u0444\u0430\u0439\u043b\u044b, \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430<\/h4>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043c\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0444\u0430\u0439\u043b .ui<br \/> \u041f\u043e \u0441\u0443\u0442\u0438 \u044d\u0442\u043e XML \u0444\u0430\u0439\u043b \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 Qt. \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c, \u043d\u043e \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u044d\u0442\u043e \u043d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f. \u0415\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u044c \u0432 Python \u043a\u043e\u0434. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0443\u0442\u0438\u043b\u0438\u0442\u0430 pyside6-uic<\/p>\n<pre><code>pyside6-uic design.ui -o design.py <\/code><\/pre>\n<p>\u041f\u043e\u044f\u0432\u0438\u0442\u0441\u044f design.py \u0444\u0430\u0439\u043b \u0441 \u0433\u043e\u0442\u043e\u0432\u044b\u043c \u043a\u043b\u0430\u0441\u0441\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0435\u0433\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438.<br \/> \u0412 \u0433\u043b\u0430\u0432\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e:<\/p>\n<pre><code>from design import Ui_MainWindow <\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0430:<\/p>\n<pre><code>from PySide6.QtWidgets import QApplication, QMainWindow from design import Ui_MainWindow  app = QApplication() window = QMainWindow()  ui = Ui_MainWindow() ui.setupUi(window)  window.show() app.exec() <\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c. \u0412\u0438\u0434\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441.<\/p>\n<h4>\u0421\u0438\u0433\u043d\u0430\u043b\u044b \u0438 \u0441\u043b\u043e\u0442\u044b<\/h4>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0435\u0441\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0430. \u041a\u043e\u0433\u0434\u0430 \u0442\u044b \u043d\u0430 \u043d\u0435\u0451 \u0436\u043c\u0451\u0448\u044c, \u043e\u043d\u0430 \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 \u0441\u0438\u0433\u043d\u0430\u043b.<br \/> \u0410 \u0435\u0441\u043b\u0438 \u0442\u044b \u0441\u043a\u0430\u0437\u0430\u043b: &#171;\u041a\u043e\u0433\u0434\u0430 \u043a\u043d\u043e\u043f\u043a\u0430 \u043d\u0430\u0436\u0430\u0442\u0430 \u2014 \u0432\u044b\u0437\u043e\u0432\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e say_hi()&#187;, \u0442\u043e say_hi() \u2014 \u044d\u0442\u043e \u0441\u043b\u043e\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0441\u0438\u0433\u043d\u0430\u043b.<\/p>\n<p>\u0421\u0430\u043c\u0438 \u0441\u043b\u043e\u0442\u044b \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043a\u043e\u0434\u0435, \u043f\u043e \u0441\u0443\u0442\u0438 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<br \/> \u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u0441\u043b\u043e\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u0432 Designer-\u0435, \u043d\u043e \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<h4>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/h4>\n<p>\u041f\u0440\u043e\u0448\u043b\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0447\u0442\u043e \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0414\u043b\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441:<\/p>\n<pre><code>from PySide6.QtWidgets import QApplication, QMainWindow from design import Ui_MainWindow  class MainWindow(QMainWindow):     def __init__(self):         super().__init__()                  self.ui = Ui_MainWindow()         self.ui.setupUi(self)  def main():     app = QApplication()     window = MainWindow()     window.show()     app.exec()  if __name__ == \"__main__\":     main() <\/code><\/pre>\n<p>\u0412\u0438\u0434\u0438\u043c &#8212; \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u0438 \u0441\u043b\u043e\u0442\u044b. \u0421\u043f\u0440\u043e\u0441\u0438\u0442\u0435, \u043a\u0430\u043a? \u0412\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e, \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 MainWindow.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code>import random   def generate_number(self):         number = random.randint(1, 100)         self.ui.label.setText(number) <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0438\u0433\u043d\u0430\u043b. \u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0449\u0435, &#171;\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c&#187; \u0432\u0438\u0434\u0436\u0435\u0442 \u043a \u0441\u043b\u043e\u0442\u0443.<\/p>\n<pre><code>self.ui.pushButton.clicked.connect(self.generate_number) <\/code><\/pre>\n<p>\u0413\u043e\u0442\u043e\u0432\u043e. \u041c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u043a\u043e\u0434. \u041f\u043e\u043b\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435:<\/p>\n<pre><code>import random from PySide6.QtWidgets import QApplication, QMainWindow from design import Ui_MainWindow  class MainWindow(QMainWindow):     def __init__(self):         super().__init__()                  self.ui = Ui_MainWindow()         self.ui.setupUi(self)         self.ui.pushButton.clicked.connect(self.generate_number)     def generate_number(self):         number = random.randint(1, 100)         self.ui.label.setText(number)  def main():     app = QApplication()     window = MainWindow()     window.show()     app.exec()  if __name__ == \"__main__\":     main() <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442. \u0412\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442!<\/p>\n<h4>\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043e\u043a\u043d\u0430<\/h4>\n<p>\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u043a\u043e\u043d\u043a\u0443, \u0440\u0430\u0437\u043c\u0435\u0440, \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043e\u043a\u043d\u0430 \u0438 \u0435\u0449\u0451 \u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0433\u043e? \u0420\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0441\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435.<\/p>\n<p>\u0418\u043a\u043e\u043d\u043a\u0430:<\/p>\n<pre><code>from PySide6.QtGui import QIcon self.setWindowIcon(QIcon('path\/to\/icon.png')) <\/code><\/pre>\n<p>* \u0422\u0430\u043a \u0436\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u043a\u043e\u043d\u043a\u0443 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0441\u043b\u0438 \u0438\u043a\u043e\u043d\u043a\u0430 \u0434\u043b\u044f \u043e\u043a\u043d\u0430 \u043d\u0435 \u0437\u0430\u0434\u0430\u043d\u0430 \u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u043a\u043e\u043d\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/p>\n<p>\u0420\u0430\u0437\u043c\u0435\u0440:<\/p>\n<pre><code>self.resize(800, 600) <\/code><\/pre>\n<p>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435:<\/p>\n<pre><code>self.setWindowTitle(\"My Window\") <\/code><\/pre>\n<p>\u0411\u043e\u043b\u044c\u0448\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432\u044b \u043d\u0430\u0439\u0434\u0451\u0442\u0435 \u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Qt \u0438 Qt for Python.<br \/> \u042d\u0442\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u0443\u043c\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438. \u041f\u0435\u0440\u0432\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u043b\u0430\u0441\u0441 \u043e\u043a\u043d\u0430 (MainWindow). \u0412\u0442\u043e\u0440\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c self \u043d\u0430 window \u0438 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e main()<\/p>\n<h4>\u0421\u0442\u0438\u043b\u0438 \u043e\u043a\u043d\u0430<\/h4>\n<pre><code>app.setStyle(\"Fusion\") <\/code><\/pre>\n<p>\u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0442\u0438\u043b\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 Windows (\u0441\u0442\u0430\u0440\u044b\u0439 \u0441\u0442\u0438\u043b\u044c \u0434\u043b\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438), WindowsVista (Legacy \u0441\u0442\u0438\u043b\u044c Windows Aero), \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 Fusion \u0438 \u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0433\u043e. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u0438\u043b\u0438 \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u043e\u0442 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b.<\/p>\n<p>\u0411\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u0440\u043e \u0441\u0442\u0438\u043b\u0438 \u0432\u044b \u043d\u0430\u0439\u0434\u0451\u0442\u0435 \u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 &#8212; <a href=\"https:\/\/doc.qt.io\/qt-6\/qstyle.html#details\" rel=\"noopener noreferrer nofollow\">https:\/\/doc.qt.io\/qt-6\/qstyle.html#details<\/a><\/p>\n<h4>\u0418\u0442\u043e\u0433<\/h4>\n<p>\u041c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u043a\u043e\u0434, \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0441\u0442\u0438\u043b\u044c. \u0412\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>\u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u043e\u043a\u043d\u0430, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u043b\u043e\u0442\u044b \u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u0438 \u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0433\u043e. \u0427\u0442\u043e \u0431\u044b \u044f \u0435\u0449\u0451 \u0441\u0434\u0435\u043b\u0430\u043b? \u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435 \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435, \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c \u0432 .exe \u0444\u0430\u0439\u043b \u0430 \u043f\u043e\u0442\u043e\u043c \u0432 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0449\u0438\u043a. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u0432\u044f\u0437\u043a\u0443 pyinstaller + Inno Setup. \u041d\u043e \u044d\u0442\u043e \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0437&#8230;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/909118\/\"> https:\/\/habr.com\/ru\/articles\/909118\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"\">\n<div><figcaption>\u041b\u043e\u0433\u043e\u0442\u0438\u043f Qt<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u043f\u044b\u0442\u0430\u044e\u0441\u044c \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0430\u043c \u043e \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 PySide (\u043a\u043e\u0442\u043e\u0440\u0430\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0438\u043d\u0434\u0438\u043d\u0433\u043e\u043c Qt) \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Python.<\/p>\n<p>\u0422\u0430\u043a \u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u043d\u0435\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u043e\u0433 &#8212; PyQt. \u042f \u043d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u043c\u043d\u043e\u0433\u0438\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0430\u044f \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u044f \u0434\u043b\u044f \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f (GPL, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 LGPL), \u0430 \u0442\u0430\u043a \u0436\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432.<\/p>\n<p>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0430\u043c\u0443\u044e \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e PySide6 (\u043f\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044e \u043d\u0430 2025 \u0433\u043e\u0434) \u0438 Python \u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430<\/p>\n<p>\u0422\u0430\u043a \u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 PySide:<\/p>\n<ul>\n<li>\n<p>PySide1 (Qt 4)<\/p>\n<\/li>\n<li>\n<p>PySide2 (Qt 5)<\/p>\n<\/li>\n<li>\n<p>PySide6 (Qt 6) \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f<\/p>\n<\/li>\n<\/ul>\n<h4>\u041d\u0430\u043c \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f:<\/h4>\n<ul>\n<li>\n<p>Python (<a href=\"https:\/\/www.python.org\/downloads\/\" rel=\"noopener noreferrer nofollow\">https:\/\/www.python.org\/downloads\/<\/a>)<\/p>\n<\/li>\n<li>\n<p>\u0423\u0434\u043e\u0431\u043d\u0430\u044f IDE\/\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043a\u043e\u0434\u0430 (Visual Studio Code \u0438\u043b\u0438 PyCharm)<\/p>\n<\/li>\n<li>\n<p>\u0421\u0430\u043c PySide6 &#8212; \u00abpip install PySide6\u00bb<\/p>\n<\/li>\n<li>\n<p>\u0417\u043d\u0430\u043d\u0438\u044f \u041e\u041e\u041f (\u0445\u043e\u0442\u044f\u0431\u044b \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435)<\/p>\n<\/li>\n<\/ul>\n<h4>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/h4>\n<p>\u041f\u0435\u0440\u0435\u0434 \u043d\u0430\u0447\u0430\u043b\u043e\u043c \u043f\u043e\u0434\u0435\u043b\u044e\u0441\u044c \u0441\u0441\u044b\u043b\u043a\u043e\u0439 \u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439, \u0435\u0441\u043b\u0438 \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f \u043a\u0430\u043a\u0438\u0435-\u043b\u0438\u0431\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u043e\u0442\u0432\u0435\u0442\u044b \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u0442 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<ul>\n<li>\n<p>Qt for Python (PySide6) &#8212; <a href=\"https:\/\/doc.qt.io\/qtforpython-6\/\" rel=\"noopener noreferrer nofollow\">https:\/\/doc.qt.io\/qtforpython-6\/<\/a><\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f Qt &#8212; <a href=\"https:\/\/doc.qt.io\/\" rel=\"noopener noreferrer nofollow\">https:\/\/doc.qt.io\/<\/a><\/p>\n<\/li>\n<li>\n<p>Qt Wiki &#8212; <a href=\"https:\/\/wiki.qt.io\/Main\" rel=\"noopener noreferrer nofollow\">https:\/\/wiki.qt.io\/Main<\/a><\/p>\n<\/li>\n<\/ul>\n<h3>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c!<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 PySide6 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044e.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Qt \u0432 \u0446\u0435\u043b\u043e\u043c.<\/p>\n<blockquote>\n<p>Qt \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u0430, \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u0438 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432. \u041e\u043d \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u043d\u0435 \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u044f\u0441\u044c \u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b.<\/p>\n<\/blockquote>\n<p>\u0421\u0430\u043c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 Qt \u0441\u043e\u0437\u0434\u0430\u043d \u0434\u043b\u044f C++ \u0430 PySide6 \u0438\u0441\u043f\u043e\u043b\u044c\u043d\u044f\u0435\u0442 \u0440\u043e\u043b\u044c &#171;\u0431\u0438\u043d\u0434\u0438\u043d\u0433\u0430&#187; (\u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438) \u0442\u043e \u0435\u0441\u0442\u044c \u043c\u044b \u043f\u0438\u0448\u0435\u043c \u043d\u0430 Python \u0430 \u0441\u0430\u043c\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 \u0421++ (\u0432\u043d\u0443\u0442\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/doc.qt.io\/qtforpython-6\/shiboken6\/index.html\" rel=\"noopener noreferrer nofollow\">shiboken6<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c C++ \u043a\u043e\u0434 \u0432 Python)<\/p>\n<figure class=\"\">\n<div><figcaption>\u041b\u043e\u0433\u043e\u0442\u0438\u043f Qt for Python<\/figcaption><\/div>\n<\/figure>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Qt \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<br \/> \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0442\u0430\u043a\u0438\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f:<\/p>\n<ul>\n<li>\n<p>Telegram (!)<\/p>\n<\/li>\n<li>\n<p>qBittorrent<\/p>\n<\/li>\n<li>\n<p>VLC Media Player<\/p>\n<\/li>\n<li>\n<p>OBS Studio<\/p>\n<\/li>\n<li>\n<p>VirtualBox<\/p>\n<\/li>\n<li>\n<p>\u0438 \u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u0445<\/p>\n<\/li>\n<\/ul>\n<p>* \u0421\u0442\u043e\u0438\u0442 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0447\u0442\u043e \u043e\u043d\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u043c C++\/Qt \u0430 \u043d\u0435 Python\/Qt<\/p>\n<h3>Hello, World!<\/h3>\n<p>\u041d\u0443 \u0447\u0442\u043e \u0436\u0435, \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<blockquote>\n<p><strong>\u0421\u043e\u0432\u0435\u0442:<\/strong> \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u00ab<a href=\"https:\/\/doc.qt.io\/qtforpython-6\/tools\/pyside-project.html\" rel=\"noopener noreferrer nofollow\">pyside6-project<\/a>\u00bb \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 PySide6 \u0441 \u0433\u043e\u0442\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432<\/p>\n<\/blockquote>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<br \/> \u0421\u043e\u0437\u0434\u0430\u044e \u043f\u0430\u043f\u043a\u0443 testapp \u0432 \u043d\u0435\u0439 main.py<\/p>\n<p>\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443<\/p>\n<pre><code>from PySide6.QtWidgets import QApplication, QLabel  app = QApplication()  label = QLabel(\"Hello, World!\") label.show()  app.exec() <\/code><\/pre>\n<blockquote>\n<p><strong>\u0421\u043e\u0432\u0435\u0442:<\/strong> \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430\u0445 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0442\u0430\u0440\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 sys.exit(app.exec()), QApplication(sys.argv), \u0438 \u0442.\u0434. \u0412 \u043d\u043e\u0432\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 Qt \u0434\u0430\u043d\u043d\u044b\u0435 \u0442\u0435\u043b\u043e\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f, \u0432\u0441\u0451 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438.<\/p>\n<\/blockquote>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u043a\u043d\u043e \u0441 \u043d\u0430\u0434\u043f\u0438\u0441\u044c\u044e Hello, World!<br \/> \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (QApplication), \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a \u043d\u0435\u043c\u0443 \u0432\u0438\u0434\u0436\u0435\u0442 &#171;label&#187; (\u0442\u0435\u043a\u0441\u0442), \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u044d\u0442\u043e\u0442 \u0432\u0438\u0434\u0436\u0435\u0442 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<br \/> \u041f\u043e\u0437\u0436\u0435 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e QMainWindow, QWidget \u0438 centralWidget.<\/p>\n<h3>Qt Designer<\/h3>\n<h4>pyside6-designer<\/h4>\n<figure class=\"\"><\/figure>\n<p>Qt Designer \u2014 \u044d\u0442\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 (GUI) \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Qt. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u043a\u043d\u0430, \u0444\u043e\u0440\u043c\u044b \u0438 \u0432\u0438\u0434\u0436\u0435\u0442\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e drag-and-drop, \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<\/p>\n<p>\u0414\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043e\u043a\u043d\u0430 \u0438 \u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0433\u043e, \u0447\u0435\u0433\u043e \u0434\u0430\u0436\u0435 \u044f \u043d\u0435 \u0437\u043d\u0430\u044e<\/p>\n<blockquote>\n<p><strong>\u0421\u043e\u0432\u0435\u0442:<\/strong> \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0442\u0435\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (\u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0435\u043b\u0443\u044e \u0438 \u0447\u0435\u0440\u043d\u0443\u044e, \u0430 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 -style (\u043f\u0440\u0438\u043c\u0435\u0440: pyside6-designer -style WindowsVista). \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u0441\u0442\u0438\u043b\u0438 \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043f\u043e\u0437\u0436\u0435.<\/p>\n<\/blockquote>\n<p>\u042f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0435 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 PySide6 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0443 pyside6-designer, \u044d\u0442\u043e \u044f\u0440\u043b\u044b\u043a. \u041d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0432\u0430\u0448\u0435\u0439 \u043f\u0430\u043f\u043a\u0435 site-packages\/PySide6\/designer.exe<\/p>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442 Qt, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0442\u0430\u043a \u0436\u0435 \u0435\u0441\u0442\u044c IDE \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 Qt \u043f\u0440\u0438\u043b\u043e\u0436\u043d\u0438\u0439 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 Python &#8212; Qt Creator. \u0415\u0441\u043b\u0438 \u0447\u0435\u0441\u0442\u043d\u043e, \u043c\u043d\u0435 \u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u0434\u0430\u043d\u043d\u0430\u044f \u0438\u0434\u0435\u044f. \u041f\u0430\u043a\u0435\u0442 PySide6 \u0438\u043c\u0435\u0435\u0442 <strong>\u0432\u0441\u0451<\/strong> \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e.<\/p>\n<p>\u0415\u0449\u0451 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 &#8212; <a href=\"https:\/\/build-system.fman.io\/qt-designer-download\" rel=\"noopener noreferrer nofollow\">https:\/\/build-system.fman.io\/qt-designer-download<\/a><\/p>\n<h4>QMainWindow (\u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u043e\u043a\u043d\u043e)<\/h4>\n<figure class=\"\"><\/figure>\n<p>\u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u043e\u043a\u043d\u043e \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u0430\u0441\u0441\u0430 QMainWindow, \u0432\u043d\u0443\u0442\u0440\u044c \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u043a\u043d\u0430 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0432\u0438\u0434\u0436\u0435\u0442 &#8212; centralWidget \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u044b, \u043a\u043d\u043e\u043f\u043a\u0438, \u043c\u0435\u043d\u044e, \u0438 \u0432\u0441\u0451 \u0447\u0442\u043e \u0432\u044b \u0442\u0443\u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0435.<\/p>\n<blockquote>\n<p><strong>\u0421\u043e\u0432\u0435\u0442:<\/strong> \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Hello, World! \u043c\u044b   \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438 \u043e\u043a\u043d\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438 \u0432\u0438\u0434\u0436\u0435\u0442. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0432\u0438\u0434\u0436\u0435\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e (\u043d\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u043d\u043e, \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f) \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u043a\u043d\u043e, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043c\u0435\u0449\u0430\u0442\u044c\u0441\u044f \u0432\u0430\u0448\u0438 \u0432\u0438\u0434\u0436\u0435\u0442\u044b (\u043b\u0443\u0447\u0448\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442)<\/p>\n<\/blockquote>\n<p>QWidget \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u044b, \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0432\u0438\u0434\u0436\u0435\u0442\u0430\u043c\u0438, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u0438 \u0442.\u0434.<\/p>\n<p>QCentralWidget \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442 QWidget \u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0433\u043b\u0430\u0432\u043d\u044b\u043c \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u043c \u043e\u043a\u043d\u0430. \u0414\u043b\u044f \u043d\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Layout (QLayout \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u0449\u0438\u043a) \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0433\u0430\u0442\u044c \u0432\u0438\u0434\u0436\u0435\u0442\u044b \u0438 \u0434\u0430\u0451\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u043e\u043a\u043d\u0430.<\/p>\n<blockquote>\n<p><strong>\u0421\u043e\u0432\u0435\u0442:<\/strong> \u0435\u0441\u043b\u0438 \u0432\u044b \u0432\u044b\u0431\u0438\u0440\u0438\u0442\u0435 QWidget \u043a\u0430\u043a \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u043e\u043a\u043d\u043e \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0442\u043e \u0432\u044b \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043e\u043a\u043d\u0430, \u0438\u043a\u043e\u043d\u043a\u0443, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 QMainWindow<\/p>\n<\/blockquote>\n<p>\u0422\u0430\u043a \u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 menuBar. \u041a\u0430\u043a \u0432\u0441\u0435 \u043f\u0440\u0438\u0432\u044b\u043a\u043b\u0438 &#8212; \u0424\u0430\u0439\u043b, \u041f\u0440\u0430\u0432\u043a\u0430, \u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430. \u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0435 \u043c\u0435\u043d\u044e \u0432\u0432\u0435\u0440\u0445\u0443 \u043e\u043a\u043d\u0430.<br \/> \u0412\u043d\u0438\u0437\u0443 &#8212; statusBar \u0433\u0434\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u0435\u0449\u0430\u0442\u044c\u0441\u044f \u0440\u0430\u0437\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f.<br \/> toolBar &#8212; \u043f\u0430\u043d\u0435\u043b\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0433\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0447\u0442\u043e-\u0442\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>DockWidget \u2014 \u044d\u0442\u043e \u0432\u0438\u0434\u0436\u0435\u0442 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f &#171;\u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0438\u0445&#187; \u043f\u0430\u043d\u0435\u043b\u0435\u0439 \u0432\u043e\u043a\u0440\u0443\u0433 \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u043e\u043a\u043d\u0430. \u0422\u0430\u043a\u0438\u0435 \u043f\u0430\u043d\u0435\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0442\u044c, \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u044f\u0442\u044c \u0441\u0431\u043e\u043a\u0443, \u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0438 \u0441\u043d\u043e\u0432\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c.<\/p>\n<figure class=\"\"><\/figure>\n<h4>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Qt Designer<\/h4>\n<p>\u0417\u0430\u0445\u043e\u0434\u0438\u043c, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b (MainWindow), \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u00ab\u0421\u043e\u0437\u0434\u0430\u0442\u044c\u00bb. \u041f\u043e\u043f\u0430\u0434\u0430\u0435\u043c \u0432 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u043e\u043a\u043d\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430. \u0421\u043b\u0435\u0432\u0430 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442 \u043e\u043a\u043d\u043e \u0441 \u0432\u0438\u0434\u0436\u0435\u0442\u0430\u043c\u0438, \u0441\u043f\u0440\u0430\u0432\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c \u044d\u0442\u0438 \u043f\u0430\u043d\u0435\u043b\u0438 \u043a\u0430\u043a \u0445\u043e\u0442\u0438\u0442\u0435, \u0430 \u0442\u0430\u043a \u0436\u0435 \u0443\u0431\u0438\u0440\u0430\u0442\u044c \u0438\u0445.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430<\/p>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c QLayout \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430 \u0446\u0435\u043d\u0442\u0440, \u0430 QPushButton \u0432\u043d\u0438\u0437. \u0421\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438 \u0434\u043b\u044f centralWidget \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c layout \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u0430\u043d\u0435\u043b\u044c \u0441\u043b\u0435\u0432\u0430 \u0432\u0432\u0435\u0440\u0445\u0443 (\u043f\u0430\u043d\u0435\u043b\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432). \u041c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e, \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>\u0424\u043e\u0440\u043c\u0430 -&gt; \u041f\u0440\u0435\u0434\u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440. \u0412\u0438\u0434\u0438\u043c \u043a\u0430\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442. \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c .ui \u0432 \u043f\u0430\u043f\u043a\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<h4>.ui \u0444\u0430\u0439\u043b\u044b, \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430<\/h4>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043c\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0444\u0430\u0439\u043b .ui<br \/> \u041f\u043e \u0441\u0443\u0442\u0438 \u044d\u0442\u043e XML \u0444\u0430\u0439\u043b \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 Qt. \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c, \u043d\u043e \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u044d\u0442\u043e \u043d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f. \u0415\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u044c \u0432 Python \u043a\u043e\u0434. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0443\u0442\u0438\u043b\u0438\u0442\u0430 pyside6-uic<\/p>\n<pre><code>pyside6-uic design.ui -o design.py <\/code><\/pre>\n<p>\u041f\u043e\u044f\u0432\u0438\u0442\u0441\u044f design.py \u0444\u0430\u0439\u043b \u0441 \u0433\u043e\u0442\u043e\u0432\u044b\u043c \u043a\u043b\u0430\u0441\u0441\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0435\u0433\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438.<br \/> \u0412 \u0433\u043b\u0430\u0432\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e:<\/p>\n<pre><code>from design import Ui_MainWindow <\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0430:<\/p>\n<pre><code>from PySide6.QtWidgets import QApplication, QMainWindow from design import Ui_MainWindow  app = QApplication() window = QMainWindow()  ui = Ui_MainWindow() ui.setupUi(window)  window.show() app.exec() <\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c. \u0412\u0438\u0434\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441.<\/p>\n<h4>\u0421\u0438\u0433\u043d\u0430\u043b\u044b \u0438 \u0441\u043b\u043e\u0442\u044b<\/h4>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0435\u0441\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0430. \u041a\u043e\u0433\u0434\u0430 \u0442\u044b \u043d\u0430 \u043d\u0435\u0451 \u0436\u043c\u0451\u0448\u044c, \u043e\u043d\u0430 \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 \u0441\u0438\u0433\u043d\u0430\u043b.<br \/> \u0410 \u0435\u0441\u043b\u0438 \u0442\u044b \u0441\u043a\u0430\u0437\u0430\u043b: &#171;\u041a\u043e\u0433\u0434\u0430 \u043a\u043d\u043e\u043f\u043a\u0430 \u043d\u0430\u0436\u0430\u0442\u0430 \u2014 \u0432\u044b\u0437\u043e\u0432\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e say_hi()&#187;, \u0442\u043e say_hi() \u2014 \u044d\u0442\u043e \u0441\u043b\u043e\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0441\u0438\u0433\u043d\u0430\u043b.<\/p>\n<p>\u0421\u0430\u043c\u0438 \u0441\u043b\u043e\u0442\u044b \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043a\u043e\u0434\u0435, \u043f\u043e \u0441\u0443\u0442\u0438 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<br \/> \u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u0441\u043b\u043e\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u0432 Designer-\u0435, \u043d\u043e \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<h4>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/h4>\n<p>\u041f\u0440\u043e\u0448\u043b\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0447\u0442\u043e \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0414\u043b\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441:<\/p>\n<pre><code>from PySide6.QtWidgets import QApplication, QMainWindow from design import Ui_MainWindow  class MainWindow(QMainWindow):     def __init__(self):         super().__init__()                  self.ui = Ui_MainWindow()         self.ui.setupUi(self)  def main():     app = QApplication()     window = MainWindow()     window.show()     app.exec()  if __name__ == \"__main__\":     main() <\/code><\/pre>\n<p>\u0412\u0438\u0434\u0438\u043c &#8212; \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u0438 \u0441\u043b\u043e\u0442\u044b. \u0421\u043f\u0440\u043e\u0441\u0438\u0442\u0435, \u043a\u0430\u043a? \u0412\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e, \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 MainWindow.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code>import random   def generate_number(self):         number = random.randint(1, 100)         self.ui.label.setText(number) <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0438\u0433\u043d\u0430\u043b. \u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0449\u0435, &#171;\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c&#187; \u0432\u0438\u0434\u0436\u0435\u0442 \u043a \u0441\u043b\u043e\u0442\u0443.<\/p>\n<pre><code>self.ui.pushButton.clicked.connect(self.generate_number) <\/code><\/pre>\n<p>\u0413\u043e\u0442\u043e\u0432\u043e. \u041c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u043a\u043e\u0434. \u041f\u043e\u043b\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435:<\/p>\n<pre><code>import random from PySide6.QtWidgets import QApplication, QMainWindow from design import Ui_MainWindow  class MainWindow(QMainWindow):     def __init__(self):         super().__init__()                  self.ui = Ui_MainWindow()         self.ui.setupUi(self)         self.ui.pushButton.clicked.connect(self.generate_number)     def generate_number(self):         number = random.randint(1, 100)         self.ui.label.setText(number)  def main():     app = QApplication()     window = MainWindow()     window.show()     app.exec()  if __name__ == \"__main__\":     main() <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442. \u0412\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442!<\/p>\n<h4>\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043e\u043a\u043d\u0430<\/h4>\n<p>\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u043a\u043e\u043d\u043a\u0443, \u0440\u0430\u0437\u043c\u0435\u0440, \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043e\u043a\u043d\u0430 \u0438 \u0435\u0449\u0451 \u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0433\u043e? \u0420\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0441\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435.<\/p>\n<p>\u0418\u043a\u043e\u043d\u043a\u0430:<\/p>\n<pre><code>from PySide6.QtGui import QIcon self.setWindowIcon(QIcon('path\/to\/icon.png')) <\/code><\/pre>\n<p>* \u0422\u0430\u043a \u0436\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u043a\u043e\u043d\u043a\u0443 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0441\u043b\u0438 \u0438\u043a\u043e\u043d\u043a\u0430 \u0434\u043b\u044f \u043e\u043a\u043d\u0430 \u043d\u0435 \u0437\u0430\u0434\u0430\u043d\u0430 \u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u043a\u043e\u043d\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/p>\n<p>\u0420\u0430\u0437\u043c\u0435\u0440:<\/p>\n<pre><code>self.resize(800, 600) <\/code><\/pre>\n<p>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435:<\/p>\n<pre><code>self.setWindowTitle(\"My Window\") <\/code><\/pre>\n<p>\u0411\u043e\u043b\u044c\u0448\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432\u044b \u043d\u0430\u0439\u0434\u0451\u0442\u0435 \u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Qt \u0438 Qt for Python.<br \/> \u042d\u0442\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u0443\u043c\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438. \u041f\u0435\u0440\u0432\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u043b\u0430\u0441\u0441 \u043e\u043a\u043d\u0430 (MainWindow). \u0412\u0442\u043e\u0440\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c self \u043d\u0430 window \u0438 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e main()<\/p>\n<h4>\u0421\u0442\u0438\u043b\u0438 \u043e\u043a\u043d\u0430<\/h4>\n<pre><code>app.setStyle(\"Fusion\") <\/code><\/pre>\n<p>\u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0442\u0438\u043b\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 Windows (\u0441\u0442\u0430\u0440\u044b\u0439 \u0441\u0442\u0438\u043b\u044c \u0434\u043b\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438), WindowsVista (Legacy \u0441\u0442\u0438\u043b\u044c Windows Aero), \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 Fusion \u0438 \u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0433\u043e. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u0438\u043b\u0438 \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u043e\u0442 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b.<\/p>\n<p>\u0411\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u0440\u043e \u0441\u0442\u0438\u043b\u0438 \u0432\u044b \u043d\u0430\u0439\u0434\u0451\u0442\u0435 \u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 &#8212; <a href=\"https:\/\/doc.qt.io\/qt-6\/qstyle.html#details\" rel=\"noopener noreferrer nofollow\">https:\/\/doc.qt.io\/qt-6\/qstyle.html#details<\/a><\/p>\n<h4>\u0418\u0442\u043e\u0433<\/h4>\n<p>\u041c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u043a\u043e\u0434, \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0441\u0442\u0438\u043b\u044c. \u0412\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>\u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u043e\u043a\u043d\u0430, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u043b\u043e\u0442\u044b \u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u0438 \u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0433\u043e. \u0427\u0442\u043e \u0431\u044b \u044f \u0435\u0449\u0451 \u0441\u0434\u0435\u043b\u0430\u043b? \u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435 \u0435\u0441\u043b\u0438<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-459522","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/459522","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=459522"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/459522\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=459522"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=459522"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=459522"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}