{"id":73446,"date":"2026-02-07T17:06:06","date_gmt":"2026-02-07T09:06:06","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/73446.html"},"modified":"2026-02-07T17:06:06","modified_gmt":"2026-02-07T09:06:06","slug":"qt-qmainwindow","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/73446.html","title":{"rendered":"QT\u2014\u2014QMainWindow"},"content":{"rendered":"<p id=\"main-toc\">\u76ee\u5f55<\/p>\n<p id=\"QMainWindow-toc\" style=\"margin-left:0px\">QMainWindow<\/p>\n<p id=\"%E8%8F%9C%E5%8D%95%E6%A0%8F%EF%BC%88Menu%20Bar%EF%BC%89-toc\" style=\"margin-left:0px\">\u83dc\u5355\u680f&#xff08;Menu Bar&#xff09;<\/p>\n<p id=\"%E6%B7%BB%E5%8A%A0%E8%8F%9C%E5%8D%95%E6%A0%8F%EF%BC%8C%E6%B7%BB%E5%8A%A0%E8%8F%9C%E5%8D%95%EF%BC%8C%E6%B7%BB%E5%8A%A0%E8%8F%9C%E5%8D%95%E9%A1%B9%EF%BC%8C%E5%B9%B6%E4%B8%BA%E8%8F%9C%E5%8D%95%E9%A1%B9%E8%AE%BE%E7%BD%AE%E8%A7%A6%E5%8F%91%E4%BA%8B%E4%BB%B6%EF%BC%88%E6%A7%BD%E5%87%BD%E6%95%B0%EF%BC%89-toc\" style=\"margin-left:40px\">\u6dfb\u52a0\u83dc\u5355\u680f&#xff0c;\u6dfb\u52a0\u83dc\u5355&#xff0c;\u6dfb\u52a0\u83dc\u5355\u9879&#xff0c;\u5e76\u4e3a\u83dc\u5355\u9879\u8bbe\u7f6e\u89e6\u53d1\u4e8b\u4ef6&#xff08;\u69fd\u51fd\u6570&#xff09;<\/p>\n<p id=\"%E7%BB%99%E8%8F%9C%E5%8D%95%EF%BC%8C%E8%8F%9C%E5%8D%95%E9%A1%B9%E6%B7%BB%E5%8A%A0%E5%BF%AB%E6%8D%B7%E9%94%AE-toc\" style=\"margin-left:40px\">\u7ed9\u83dc\u5355&#xff0c;\u83dc\u5355\u9879\u6dfb\u52a0\u5feb\u6377\u952e<\/p>\n<p id=\"%E6%B7%BB%E5%8A%A0%E5%AD%90%E8%8F%9C%E5%8D%95-toc\" style=\"margin-left:40px\">\u6dfb\u52a0\u5b50\u83dc\u5355<\/p>\n<p id=\"%E7%BB%99%E8%8F%9C%E5%8D%95%E9%A1%B9%E4%B9%8B%E9%97%B4%E6%B7%BB%E5%8A%A0%E5%88%86%E5%89%B2%E7%BA%BF-toc\" style=\"margin-left:40px\">\u7ed9\u83dc\u5355\u9879\u4e4b\u95f4\u6dfb\u52a0\u5206\u5272\u7ebf<\/p>\n<p id=\"%E7%BB%99%E8%8F%9C%E5%8D%95%2F%E8%8F%9C%E5%8D%95%E9%A1%B9%E6%B7%BB%E5%8A%A0%E5%9B%BE%E6%A0%87-toc\" style=\"margin-left:40px\">\u7ed9\u83dc\u5355\/\u83dc\u5355\u9879\u6dfb\u52a0\u56fe\u6807<\/p>\n<p id=\"%E9%A2%98%E5%A4%96%E8%AF%9D%E2%80%94%E2%80%94%E5%88%9B%E5%BB%BA%E8%8F%9C%E5%8D%95%E6%A0%8F%E7%9A%84%E5%86%85%E5%AD%98%E6%B3%84%E6%BC%8F-toc\" style=\"margin-left:40px\">\u9898\u5916\u8bdd\u2014\u2014\u521b\u5efa\u83dc\u5355\u680f\u7684\u5185\u5b58\u6cc4\u6f0f<\/p>\n<p id=\"%E5%B7%A5%E5%85%B7%E6%A0%8F%EF%BC%88QToolBar%EF%BC%89-toc\" style=\"margin-left:0px\">\u5de5\u5177\u680f&#xff08;QToolBar&#xff09;<\/p>\n<p id=\"%E5%88%9B%E5%BB%BA%E5%B7%A5%E5%85%B7%E6%A0%8F%EF%BC%8C%E7%BB%99%E5%B7%A5%E5%85%B7%E6%A0%8F%E6%B7%BB%E5%8A%A0action%EF%BC%8C%E7%BB%99action%E8%AE%BE%E7%BD%AE%E5%9B%BE%E6%A0%87%E4%BB%A5%E5%8F%8A%E6%8F%90%E7%A4%BA%E4%BF%A1%E6%81%AF-toc\" style=\"margin-left:40px\">\u521b\u5efa\u5de5\u5177\u680f&#xff0c;\u7ed9\u5de5\u5177\u680f\u6dfb\u52a0action&#xff0c;\u7ed9action\u8bbe\u7f6e\u56fe\u6807\u4ee5\u53ca\u63d0\u793a\u4fe1\u606f<\/p>\n<p id=\"%E8%8F%9C%E5%8D%95%E6%A0%8F%E5%92%8C%E5%B7%A5%E5%85%B7%E6%A0%8F%E7%BB%93%E5%90%88%E4%BD%BF%E7%94%A8-toc\" style=\"margin-left:40px\">\u83dc\u5355\u680f\u548c\u5de5\u5177\u680f\u7ed3\u5408\u4f7f\u7528<\/p>\n<p id=\"%E8%AE%BE%E7%BD%AE%E5%A4%9A%E4%B8%AA%E5%B7%A5%E5%85%B7%E6%A0%8F-toc\" style=\"margin-left:40px\">\u8bbe\u7f6e\u591a\u4e2a\u5de5\u5177\u680f<\/p>\n<p id=\"%E5%B7%A5%E5%85%B7%E6%A0%8F%E7%9A%84%E7%A7%BB%E5%8A%A8%E8%AE%BE%E7%BD%AE-toc\" style=\"margin-left:40px\">\u5de5\u5177\u680f\u7684\u79fb\u52a8\u8bbe\u7f6e<\/p>\n<p id=\"%E7%8A%B6%E6%80%81%E6%A0%8F%EF%BC%88Status%20Bar%EF%BC%89-toc\" style=\"margin-left:0px\">\u72b6\u6001\u680f&#xff08;Status Bar&#xff09;<\/p>\n<p id=\"QDockWidget-toc\" style=\"margin-left:0px\">QDockWidget<\/p>\n<hr \/>\n<h2 id=\"QMainWindow\"><span style=\"color:#0d0016\">QMainWindow<\/span><\/h2>\n<p><span style=\"color:#0d0016\">\u5927\u591a\u6570\u65f6\u5019\u5ba2\u6237\u7aef\u7a97\u53e3\u7684\u4e3b\u4f53\u662fQMainWindow\u800c\u4e0d\u662fQWidget&#xff0c;QWidget\u662f\u5176\u4e2d\u7684\u7ec4\u6210\u90e8\u5206\u3002QMainWindow\u7684\u7ec4\u6210\u5982\u4e0b&#xff1a;<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"611\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260207090602-6987007a397ae.png\" width=\"966\" \/><\/p>\n<p><span style=\"color:#0d0016\">\u5b9e\u9645\u4e0a&#xff0c;\u5f53\u6211\u4eec\u521b\u5efa\u4e00\u4e2aQMainWindow\u9879\u76ee\u5e76\u9009\u62e9\u751f\u6210ui\u6587\u4ef6\u7684\u65f6\u5019&#xff0c;\u4e2d\u5fc3\u7a97\u53e3&#xff0c;\u83dc\u5355\u680f&#xff0c;\u72b6\u6001\u680f\u90fd\u662f\u9ed8\u8ba4\u521b\u5efa\u597d\u7684&#xff1a;<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"329\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260207090602-6987007a6a88b.png\" width=\"854\" \/><\/p>\n<hr \/>\n<h2 id=\"%E8%8F%9C%E5%8D%95%E6%A0%8F%EF%BC%88Menu%20Bar%EF%BC%89\"><span style=\"color:#0d0016\">\u83dc\u5355\u680f&#xff08;Menu Bar&#xff09;<\/span><\/h2>\n<p><span style=\"color:#0d0016\">\u4e00\u4e2a\u7a97\u53e3\u53ea\u80fd\u6709\u4e00\u4e2a\u83dc\u5355\u680f&#xff0c;\u83dc\u5355\u680f\u7ed3\u6784\u793a\u610f\u56fe\u5982\u4e0b&#xff1a;<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"286\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260207090602-6987007a864c8.png\" width=\"897\" \/><\/p>\n<h3 id=\"%E6%B7%BB%E5%8A%A0%E8%8F%9C%E5%8D%95%E6%A0%8F%EF%BC%8C%E6%B7%BB%E5%8A%A0%E8%8F%9C%E5%8D%95%EF%BC%8C%E6%B7%BB%E5%8A%A0%E8%8F%9C%E5%8D%95%E9%A1%B9%EF%BC%8C%E5%B9%B6%E4%B8%BA%E8%8F%9C%E5%8D%95%E9%A1%B9%E8%AE%BE%E7%BD%AE%E8%A7%A6%E5%8F%91%E4%BA%8B%E4%BB%B6%EF%BC%88%E6%A7%BD%E5%87%BD%E6%95%B0%EF%BC%89\"><span style=\"color:#0d0016\">\u6dfb\u52a0\u83dc\u5355\u680f&#xff0c;\u6dfb\u52a0\u83dc\u5355&#xff0c;\u6dfb\u52a0\u83dc\u5355\u9879&#xff0c;\u5e76\u4e3a\u83dc\u5355\u9879\u8bbe\u7f6e\u89e6\u53d1\u4e8b\u4ef6&#xff08;\u69fd\u51fd\u6570&#xff09;<\/span><\/h3>\n<p>MainWindow::MainWindow(QWidget *parent)<br \/>\n    : QMainWindow(parent)<br \/>\n    , ui(new Ui::MainWindow)<br \/>\n{<br \/>\n    ui-&gt;setupUi(this);<\/p>\n<p>    \/\/\u521b\u5efa\u4e00\u4e2a\u83dc\u5355\u680f\u5bf9\u8c61<br \/>\n    QMenuBar* menubar &#061; new QMenuBar();<br \/>\n    \/\/\u5c06\u83dc\u5355\u680f\u6dfb\u52a0\u5230\u7a97\u53e3&#xff0c;\u6b64\u65f6menubar\u7684\u7236\u8282\u70b9\u88ab\u8bbe\u7f6e\u4e3a\u7a97\u53e3<br \/>\n    this-&gt;setMenuBar(menubar);<\/p>\n<p>    \/\/\u7ed9\u83dc\u5355\u680f\u6dfb\u52a0\u83dc\u5355<br \/>\n    QMenu *menu1 &#061; new QMenu(&#034;\u6587\u4ef6&#034;);\/\/\u521b\u5efa\u83dc\u5355\u5bf9\u8c61<br \/>\n    QMenu *menu2 &#061; new QMenu(&#034;\u7f16\u8f91&#034;);<br \/>\n    QMenu *menu3 &#061; new QMenu(&#034;\u5e2e\u52a9&#034;);<br \/>\n    menubar-&gt;addMenu(menu1);\/\/\u628a\u83dc\u5355\u5bf9\u8c61\u6dfb\u52a0\u5230\u83dc\u5355\u680f<br \/>\n    menubar-&gt;addMenu(menu2);<br \/>\n    menubar-&gt;addMenu(menu3);<\/p>\n<p>    \/\/\u7ed9\u83dc\u5355\u6dfb\u52a0\u83dc\u5355\u9879<br \/>\n    QAction * action1 &#061; new QAction(&#034;\u6253\u5f00&#034;);\/\/\u521b\u5efa\u83dc\u5355\u9879\u5bf9\u8c61<br \/>\n    QAction * action2 &#061; new QAction(&#034;\u4fdd\u5b58&#034;);<br \/>\n    QAction * action3 &#061; new QAction(&#034;\u9000\u51fa&#034;);<br \/>\n    menu1-&gt;addAction(action1);\/\/\u628a\u83dc\u5355\u9879\u5bf9\u8c61\u6dfb\u52a0\u5230\u83dc\u5355<br \/>\n    menu1-&gt;addAction(action2);<br \/>\n    menu1-&gt;addAction(action3);<\/p>\n<p>    \/\/\u7ed9\u83dc\u5355\u9879\u5173\u8054\u4e00\u4e2a\u69fd<br \/>\n    connect(action1,&amp;QAction::triggered,this,&amp;MainWindow::handler);<br \/>\n}<\/p>\n<p>void MainWindow::handler()<br \/>\n{<br \/>\n    qDebug()&lt;&lt;&#034;\u70b9\u51fb\u4e86\u6253\u5f00\u6309\u94ae!&#034;;<br \/>\n} <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"622\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260207090602-6987007aa84e4.png\" width=\"1427\" \/><\/p>\n<h3 id=\"%E7%BB%99%E8%8F%9C%E5%8D%95%EF%BC%8C%E8%8F%9C%E5%8D%95%E9%A1%B9%E6%B7%BB%E5%8A%A0%E5%BF%AB%E6%8D%B7%E9%94%AE\"><span style=\"color:#0d0016\">\u7ed9\u83dc\u5355&#xff0c;\u83dc\u5355\u9879\u6dfb\u52a0\u5feb\u6377\u952e<\/span><\/h3>\n<p>MainWindow::MainWindow(QWidget *parent)<br \/>\n    : QMainWindow(parent)<br \/>\n    , ui(new Ui::MainWindow)<br \/>\n{<br \/>\n    ui-&gt;setupUi(this);<\/p>\n<p>    \/\/\u521b\u5efa\u4e00\u4e2a\u83dc\u5355\u680f\u5bf9\u8c61<br \/>\n    QMenuBar* menubar &#061; new QMenuBar();<br \/>\n    \/\/\u5c06\u83dc\u5355\u680f\u6dfb\u52a0\u5230\u7a97\u53e3&#xff0c;\u6b64\u65f6menubar\u7684\u7236\u8282\u70b9\u88ab\u8bbe\u7f6e\u4e3a\u7a97\u53e3<br \/>\n    this-&gt;setMenuBar(menubar);<\/p>\n<p>    \/\/\u7ed9\u83dc\u5355\u680f\u6dfb\u52a0\u83dc\u5355<br \/>\n    QMenu *menu1 &#061; new QMenu(&#034;\u6587\u4ef6(&amp;a)&#034;);\/\/\u521b\u5efa\u83dc\u5355\u5bf9\u8c61,\u5e76\u6dfb\u52a0\u5feb\u6377\u952eALt&#043;a<br \/>\n    QMenu *menu2 &#061; new QMenu(&#034;\u7f16\u8f91(&amp;b)&#034;);<br \/>\n    QMenu *menu3 &#061; new QMenu(&#034;\u5e2e\u52a9(&amp;c)&#034;);<br \/>\n    menubar-&gt;addMenu(menu1);\/\/\u628a\u83dc\u5355\u5bf9\u8c61\u6dfb\u52a0\u5230\u83dc\u5355\u680f<br \/>\n    menubar-&gt;addMenu(menu2);<br \/>\n    menubar-&gt;addMenu(menu3);<\/p>\n<p>    \/\/\u7ed9\u83dc\u5355\u6dfb\u52a0\u83dc\u5355\u9879<br \/>\n    QAction * action1 &#061; new QAction(&#034;\u6253\u5f00(&amp;z)&#034;);\/\/\u521b\u5efa\u83dc\u5355\u9879\u5bf9\u8c61\u5e76\u6dfb\u52a0\u5feb\u6377\u952eALt&#043;z<br \/>\n    QAction * action2 &#061; new QAction(&#034;\u4fdd\u5b58&#034;);<br \/>\n    QAction * action3 &#061; new QAction(&#034;\u9000\u51fa&#034;);<br \/>\n    menu1-&gt;addAction(action1);\/\/\u628a\u83dc\u5355\u9879\u5bf9\u8c61\u6dfb\u52a0\u5230\u83dc\u5355<br \/>\n    menu1-&gt;addAction(action2);<br \/>\n    menu1-&gt;addAction(action3);<\/p>\n<p>    \/\/\u7ed9\u83dc\u5355\u9879\u5173\u8054\u4e00\u4e2a\u69fd<br \/>\n    connect(action1,&amp;QAction::triggered,this,&amp;MainWindow::handler);<br \/>\n} <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"777\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260207090603-6987007b036e0.png\" width=\"1057\" \/><\/p>\n<p><span style=\"color:#fe2c24\">\u5728\u83dc\u5355\/\u83dc\u5355\u9879\u6587\u672c\u6dfb\u52a0&#034;&amp;&#043;\u5b57\u6bcd&#034;\u5c31\u8868\u793a\u7ed9\u8fd9\u4e2a\u83dc\u5355\/\u83dc\u5355\u9879\u6dfb\u52a0\u5feb\u6377\u952e&#034;alt&#043;\u5b57\u6bcd&#034;<\/span><span style=\"color:#0d0016\">\u3002<\/span><\/p>\n<h3 id=\"%E6%B7%BB%E5%8A%A0%E5%AD%90%E8%8F%9C%E5%8D%95\"><span style=\"color:#0d0016\">\u6dfb\u52a0\u5b50\u83dc\u5355<\/span><\/h3>\n<p>MainWindow::MainWindow(QWidget *parent)<br \/>\n    : QMainWindow(parent)<br \/>\n    , ui(new Ui::MainWindow)<br \/>\n{<br \/>\n    ui-&gt;setupUi(this);<\/p>\n<p>    \/\/\u521b\u5efa\u4e00\u4e2a\u83dc\u5355\u680f\u5bf9\u8c61<br \/>\n    QMenuBar* menubar &#061; new QMenuBar();<br \/>\n    \/\/\u5c06\u83dc\u5355\u680f\u6dfb\u52a0\u5230\u7a97\u53e3&#xff0c;\u6b64\u65f6menubar\u7684\u7236\u8282\u70b9\u88ab\u8bbe\u7f6e\u4e3a\u7a97\u53e3<br \/>\n    this-&gt;setMenuBar(menubar);<\/p>\n<p>    \/\/\u7ed9\u83dc\u5355\u680f\u6dfb\u52a0\u83dc\u5355<br \/>\n    QMenu *menu1 &#061; new QMenu(&#034;\u7236\u83dc\u5355&#034;);\/\/\u521b\u5efa\u83dc\u5355\u5bf9\u8c61<br \/>\n    QMenu *menu2 &#061; new QMenu(&#034;\u83dc\u53552&#034;);<br \/>\n    QMenu *menu3 &#061; new QMenu(&#034;\u5b50\u83dc\u5355&#034;);<br \/>\n    menubar-&gt;addMenu(menu1);\/\/\u628a\u83dc\u5355\u5bf9\u8c61\u6dfb\u52a0\u5230\u83dc\u5355\u680f<br \/>\n    menubar-&gt;addMenu(menu2);<br \/>\n    menu1-&gt;addMenu(menu3);\/\/\u83dc\u5355\u5bf9\u8c61\u4e2d\u4e5f\u6709addMenu\u65b9\u6cd5&#xff0c;\u7528\u4e8e\u6dfb\u52a0\u5b50\u83dc\u5355<\/p>\n<p>    \/\/\u7ed9\u83dc\u5355\u6dfb\u52a0\u83dc\u5355\u9879<br \/>\n    QAction * action1 &#061; new QAction(&#034;\u6253\u5f00&#034;);\/\/\u521b\u5efa\u83dc\u5355\u9879\u5bf9\u8c61<br \/>\n    QAction * action2 &#061; new QAction(&#034;\u4fdd\u5b58&#034;);<br \/>\n    QAction * action3 &#061; new QAction(&#034;\u9000\u51fa&#034;);<br \/>\n    menu1-&gt;addAction(action1);\/\/\u628a\u83dc\u5355\u9879\u5bf9\u8c61\u6dfb\u52a0\u5230\u83dc\u5355<br \/>\n    menu3-&gt;addAction(action2);<br \/>\n    menu3-&gt;addAction(action3);<br \/>\n} <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"639\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260207090603-6987007b5e39e.png\" width=\"817\" \/><\/p>\n<h3 id=\"%E7%BB%99%E8%8F%9C%E5%8D%95%E9%A1%B9%E4%B9%8B%E9%97%B4%E6%B7%BB%E5%8A%A0%E5%88%86%E5%89%B2%E7%BA%BF\"><span style=\"color:#0d0016\">\u7ed9\u83dc\u5355\u9879\u4e4b\u95f4\u6dfb\u52a0\u5206\u5272\u7ebf<\/span><\/h3>\n<p>MainWindow::MainWindow(QWidget *parent)<br \/>\n    : QMainWindow(parent)<br \/>\n    , ui(new Ui::MainWindow)<br \/>\n{<br \/>\n    ui-&gt;setupUi(this);<\/p>\n<p>    \/\/\u521b\u5efa\u4e00\u4e2a\u83dc\u5355\u680f\u5bf9\u8c61<br \/>\n    QMenuBar* menubar &#061; new QMenuBar();<br \/>\n    \/\/\u5c06\u83dc\u5355\u680f\u6dfb\u52a0\u5230\u7a97\u53e3&#xff0c;\u6b64\u65f6menubar\u7684\u7236\u8282\u70b9\u88ab\u8bbe\u7f6e\u4e3a\u7a97\u53e3<br \/>\n    this-&gt;setMenuBar(menubar);<\/p>\n<p>    \/\/\u7ed9\u83dc\u5355\u680f\u6dfb\u52a0\u83dc\u5355<br \/>\n    QMenu *menu1 &#061; new QMenu(&#034;\u83dc\u53551&#034;);\/\/\u521b\u5efa\u83dc\u5355\u5bf9\u8c61<br \/>\n    QMenu *menu2 &#061; new QMenu(&#034;\u83dc\u53552&#034;);<br \/>\n    menubar-&gt;addMenu(menu1);\/\/\u628a\u83dc\u5355\u5bf9\u8c61\u6dfb\u52a0\u5230\u83dc\u5355\u680f<br \/>\n    menubar-&gt;addMenu(menu2);<\/p>\n<p>    \/\/\u7ed9\u83dc\u5355\u6dfb\u52a0\u83dc\u5355\u9879<br \/>\n    QAction * action1 &#061; new QAction(&#034;\u83dc\u5355\u98791&#034;);\/\/\u521b\u5efa\u83dc\u5355\u9879\u5bf9\u8c61<br \/>\n    QAction * action2 &#061; new QAction(&#034;\u83dc\u5355\u98792&#034;);<br \/>\n    QAction * action3 &#061; new QAction(&#034;\u83dc\u5355\u98793&#034;);<br \/>\n    QAction * action4 &#061; new QAction(&#034;\u83dc\u5355\u98794&#034;);<br \/>\n    menu1-&gt;addAction(action1);\/\/\u628a\u83dc\u5355\u9879\u5bf9\u8c61\u6dfb\u52a0\u5230\u83dc\u5355<br \/>\n    menu1-&gt;addAction(action2);<br \/>\n    menu1-&gt;addSeparator();\/\/\u628a\u5206\u5272\u7ebf\u4e5f\u5f53\u505a\u4e00\u4e2a\u83dc\u5355\u9879&#xff0c;\u5b83\u5728\u8c01\u540e\u9762\u88ab\u6dfb\u52a0&#xff0c;\u5206\u5272\u7ebf\u5c31\u5728\u8c01\u540e\u9762<br \/>\n    menu1-&gt;addAction(action3);<br \/>\n    menu1-&gt;addAction(action4);<\/p>\n<p>}<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"516\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260207090603-6987007b929fc.png\" width=\"805\" \/><\/p>\n<h3 id=\"%E7%BB%99%E8%8F%9C%E5%8D%95%2F%E8%8F%9C%E5%8D%95%E9%A1%B9%E6%B7%BB%E5%8A%A0%E5%9B%BE%E6%A0%87\"><span style=\"color:#0d0016\">\u7ed9\u83dc\u5355\/\u83dc\u5355\u9879\u6dfb\u52a0\u56fe\u6807<\/span><\/h3>\n<p>MainWindow::MainWindow(QWidget *parent)<br \/>\n    : QMainWindow(parent)<br \/>\n    , ui(new Ui::MainWindow)<br \/>\n{<br \/>\n    ui-&gt;setupUi(this);<\/p>\n<p>    \/\/\u521b\u5efa\u4e00\u4e2a\u83dc\u5355\u680f\u5bf9\u8c61<br \/>\n    QMenuBar* menubar &#061; new QMenuBar();<br \/>\n    \/\/\u5c06\u83dc\u5355\u680f\u6dfb\u52a0\u5230\u7a97\u53e3&#xff0c;\u6b64\u65f6menubar\u7684\u7236\u8282\u70b9\u88ab\u8bbe\u7f6e\u4e3a\u7a97\u53e3<br \/>\n    this-&gt;setMenuBar(menubar);<\/p>\n<p>    \/\/\u7ed9\u83dc\u5355\u680f\u6dfb\u52a0\u83dc\u5355<br \/>\n    QMenu *menu1 &#061; new QMenu(&#034;\u83dc\u53551&#034;);\/\/\u521b\u5efa\u83dc\u5355\u5bf9\u8c61<br \/>\n    QMenu *menu2 &#061; new QMenu(&#034;\u5b50\u83dc\u5355&#034;);\/\/\u521b\u5efa\u83dc\u5355\u5bf9\u8c61<br \/>\n    menubar-&gt;addMenu(menu1);\/\/\u628a\u83dc\u5355\u5bf9\u8c61\u6dfb\u52a0\u5230\u83dc\u5355\u680f<br \/>\n    menu1-&gt;addMenu(menu2);\/\/\u7ed9\u83dc\u53551\u6dfb\u52a0\u5b50\u83dc\u5355<\/p>\n<p>    \/\/\u7ed9\u83dc\u53551\u6dfb\u52a0\u56fe\u6807<br \/>\n    menu1-&gt;setIcon(QIcon(&#034;:\/rose.jpg&#034;));<br \/>\n    \/\/\u7ed9\u5b50\u83dc\u5355\u6dfb\u52a0\u56fe\u6807<br \/>\n    menu2-&gt;setIcon(QIcon(&#034;:\/rose.jpg&#034;));<\/p>\n<p>    \/\/\u7ed9\u83dc\u5355\u6dfb\u52a0\u83dc\u5355\u9879<br \/>\n    QAction * action1 &#061; new QAction(&#034;\u83dc\u5355\u98791&#034;);\/\/\u521b\u5efa\u83dc\u5355\u9879\u5bf9\u8c61<br \/>\n    \/\/\u7ed9\u83dc\u5355\u9879\u6dfb\u52a0\u56fe\u6807<br \/>\n    action1-&gt;setIcon(QIcon(&#034;:\/rose.jpg&#034;));<br \/>\n    \/\/\u628a\u83dc\u5355\u9879\u5bf9\u8c61\u6dfb\u52a0\u5230\u83dc\u5355<br \/>\n    menu1-&gt;addAction(action1);<br \/>\n}<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"395\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260207090603-6987007bbebf2.png\" width=\"799\" \/><\/p>\n<p><span style=\"color:#fe2c24\">\u83dc\u5355&#xff0c;\u5b50\u83dc\u5355&#xff0c;\u83dc\u5355\u9879\u90fd\u53ef\u4ee5\u8bbe\u7f6e\u56fe\u6807&#xff0c;\u4f46\u662f\u5982\u679c\u7ed9\u83dc\u5355\u8bbe\u7f6e\u56fe\u6807\u7684\u8bdd&#xff0c;\u5c31\u4f1a\u628a\u539f\u6709\u6587\u672c\u8986\u76d6<\/span><span style=\"color:#0d0016\">\u3002<\/span><\/p>\n<h3 id=\"%E9%A2%98%E5%A4%96%E8%AF%9D%E2%80%94%E2%80%94%E5%88%9B%E5%BB%BA%E8%8F%9C%E5%8D%95%E6%A0%8F%E7%9A%84%E5%86%85%E5%AD%98%E6%B3%84%E6%BC%8F\"><span style=\"color:#0d0016\">\u9898\u5916\u8bdd\u2014\u2014\u521b\u5efa\u83dc\u5355\u680f\u7684\u5185\u5b58\u6cc4\u6f0f<\/span><\/h3>\n<p><span style=\"color:#0d0016\">\u5728\u8be5\u6587\u7ae0\u5f00\u5934\u6211\u4eec\u4ee5\u53ca\u8c08\u53ca&#xff0c;\u4e00\u65e6\u521b\u5efa\u4e86\u4e00\u4e2aQMainWindows\u9879\u76ee\u5e76\u4e14\u9009\u62e9\u4f7f\u7528QtDesigner(\u4e5f\u5c31\u662f\u4f7f\u7528ui\u6587\u4ef6)&#xff0c;\u90a3\u4e48\u9ed8\u8ba4\u5c31\u4f1a\u751f\u6210\u4e00\u4e2a\u83dc\u5355\u680f&#xff0c;\u800c\u4e0a\u9762\u7684\u6240\u6709\u4ee3\u7801\u4e2d\u6211\u662f\u8fd9\u4e48\u5199\u7684&#xff1a;<\/span><\/p>\n<p>  \/\/\u521b\u5efa\u4e00\u4e2a\u83dc\u5355\u680f\u5bf9\u8c61<br \/>\n  QMenuBar* menubar &#061; new QMenuBar();<br \/>\n  \/\/\u5c06\u83dc\u5355\u680f\u6dfb\u52a0\u5230\u7a97\u53e3&#xff0c;\u6b64\u65f6menubar\u7684\u7236\u8282\u70b9\u88ab\u8bbe\u7f6e\u4e3a\u7a97\u53e3<br \/>\n  this-&gt;setMenuBar(menubar);<\/p>\n<p><span style=\"color:#0d0016\">\u4e00\u4e2a\u7a97\u53e3\u53ea\u80fd\u6709\u4e00\u4e2a\u83dc\u5355\u680f&#xff0c;\u8fd9\u5c31\u76f8\u5f53\u4e8e\u6211\u4eec\u65b0\u521b\u5efa\u4e86\u4e00\u4e2a\u83dc\u5355\u680f&#xff0c;<\/span><span style=\"color:#fe2c24\">\u628a\u4eba\u5bb6\u9ed8\u8ba4\u751f\u6210\u7684\u7ed9\u66ff\u6362\u6389\u4e86&#xff0c;\u539f\u6709\u7684\u83dc\u5355\u680f\u5bf9\u8c61\u5c31\u5f97\u4e0d\u5230\u91ca\u653e\u4e86<\/span><span style=\"color:#0d0016\">\u3002&#xff08;\u7ec6\u5fc3\u7684\u540c\u5b66\u53ef\u80fd\u53d1\u73b0\u6211\u5728\u521b\u5efa\u83dc\u5355\u680f\u7684\u65f6\u5019\u6ca1\u6709\u6307\u5b9a\u83dc\u5355\u680f\u7684\u7236\u5bf9\u8c61\u53ef\u80fd\u5bfc\u81f4\u5185\u5b58\u6cc4\u6f0f&#xff0c;\u4e0d\u5fc5\u62c5\u5fc3&#xff0c;setMenuBar\u4f1a\u5e2e\u6211\u4eec\u628a\u5bf9\u8c61\u6302\u5230\u5bf9\u8c61\u6811\u4e0a\u3002&#xff09;\u4e0b\u9762\u6211\u4eec\u4fee\u6539\u4ee3\u7801&#xff0c;\u4fee\u590d\u5185\u5b58\u6cc4\u6f0f&#xff1a;<\/span><\/p>\n<p>QMenuBar* menubar &#061; this-&gt;menuBar();<br \/>\nthis-&gt;setMenuBar(menubar); <\/p>\n<p><span style=\"color:#0d0016\">menuBar\u51fd\u6570\u5c31\u662f\u4ece\u7a97\u53e3\u4e2d\u83b7\u53d6\u4e00\u4e2a\u83dc\u5355\u680f\u5bf9\u8c61&#xff0c;<\/span><span style=\"color:#fe2c24\">\u5982\u679c\u6709\u5c31\u76f4\u63a5\u83b7\u53d6&#xff0c;\u5982\u679c\u6ca1\u6709\u5c31\u521b\u5efa\u4e00\u4e2a<\/span><span style=\"color:#0d0016\">\u3002\u8fd9\u6837\u4e00\u6765&#xff0c;\u5728\u4e0b\u9762\u8bbe\u7f6e\u7a97\u53e3\u7684\u83dc\u5355\u680f\u65f6&#xff0c;\u5982\u679c\u672c\u6765\u6ca1\u6709&#xff0c;\u6211\u4eec\u5c31\u628a\u65b0\u521b\u5efa\u7684\u83dc\u5355\u680f\u5bf9\u8c61\u8bbe\u7f6e\u8fdb\u53bb\u4e86&#xff0c;\u5982\u679c\u6709&#xff0c;\u4e5f\u662f\u81ea\u5df1\u66ff\u6362\u81ea\u5df1&#xff0c;\u4e0d\u4f1a\u9020\u6210\u5185\u5b58\u6cc4\u6f0f\u3002<\/span><\/p>\n<p><span style=\"color:#0d0016\">\u5f53\u7136&#xff0c;\u4e0d\u53ea\u662f\u83dc\u5355\u680f&#xff0c;\u9009\u62e9ui\u6587\u4ef6\u540e\u9ed8\u8ba4\u751f\u6210\u7684\u680f\u5982\u679c\u4f7f\u7528\u4e0d\u5f53\u90fd\u4f1a\u51fa\u73b0\u8fd9\u79cd\u95ee\u9898\u3002<\/span><\/p>\n<hr \/>\n<h2 id=\"%E5%B7%A5%E5%85%B7%E6%A0%8F%EF%BC%88QToolBar%EF%BC%89\"><span style=\"color:#0d0016\">\u5de5\u5177\u680f&#xff08;QToolBar&#xff09;<\/span><\/h2>\n<p><span style=\"color:#0d0016\">\u5927\u591a\u6570\u60c5\u51b5\u4e0b&#xff0c;\u5de5\u5177\u680f\u4e2d\u7684\u5185\u5bb9\u5c31\u662f\u83dc\u5355\u4e2d\u7684\u83dc\u5355\u9879&#xff0c;\u76f8\u5f53\u4e8e\u83dc\u5355\u9879\u7684\u5feb\u6377\u952e&#xff0c;\u56e0\u6b64<\/span><span style=\"color:#fe2c24\">\u5de5\u5177\u680f\u4e2d\u7684\u5143\u7d20\u4e5f\u662f\u7528QAction\u5bf9\u8c61\u8868\u793a<\/span><span style=\"color:#0d0016\">\u3002<\/span><\/p>\n<p><span style=\"color:#0d0016\">\u9664\u6b64\u4e4b\u5916&#xff0c;<\/span><span style=\"color:#fe2c24\">\u4e00\u4e2a\u7a97\u53e3\u53ef\u4ee5\u6709\u591a\u4e2a\u5de5\u5177\u680f<\/span><span style=\"color:#0d0016\">&#xff0c;\u4e5f\u6b63\u662f\u56e0\u6b64&#xff0c;\u6dfb\u52a0\u5de5\u5177\u680f\u7684\u63a5\u53e3\u662faddToolBar\u800c\u4e0d\u662f\u50cf\u6dfb\u52a0\u83dc\u5355\u680f\u4e00\u6837\u683c\u5f0f\u7684setToolBar\u3002<\/span><\/p>\n<h3 id=\"%E5%88%9B%E5%BB%BA%E5%B7%A5%E5%85%B7%E6%A0%8F%EF%BC%8C%E7%BB%99%E5%B7%A5%E5%85%B7%E6%A0%8F%E6%B7%BB%E5%8A%A0action%EF%BC%8C%E7%BB%99action%E8%AE%BE%E7%BD%AE%E5%9B%BE%E6%A0%87%E4%BB%A5%E5%8F%8A%E6%8F%90%E7%A4%BA%E4%BF%A1%E6%81%AF\"><span style=\"color:#0d0016\">\u521b\u5efa\u5de5\u5177\u680f&#xff0c;\u7ed9\u5de5\u5177\u680f\u6dfb\u52a0action&#xff0c;\u7ed9action\u8bbe\u7f6e\u56fe\u6807\u4ee5\u53ca\u63d0\u793a\u4fe1\u606f<\/span><\/h3>\n<p>MainWindow::MainWindow(QWidget *parent)<br \/>\n    : QMainWindow(parent)<br \/>\n    , ui(new Ui::MainWindow)<br \/>\n{<br \/>\n    ui-&gt;setupUi(this);<\/p>\n<p>    \/\/\u521b\u5efa\u5de5\u5177\u680f\u5bf9\u8c61<br \/>\n    QToolBar* tb &#061; new QToolBar();<br \/>\n    \/\/\u5c06\u5de5\u5177\u680f\u5bf9\u8c61\u6dfb\u52a0\u5230\u7a97\u53e3\u4e2d<br \/>\n    this-&gt;addToolBar(tb);<\/p>\n<p>    \/\/\u521b\u5efaQAction<br \/>\n    QAction * action1 &#061; new QAction(&#034;\u9009\u98791&#034;);<br \/>\n    QAction * action2 &#061; new QAction(&#034;\u9009\u98792&#034;);<br \/>\n    \/\/\u7ed9QAction\u8bbe\u7f6e\u56fe\u6807&#xff0c;\u4e00\u822c\u6765\u8bf4\u5de5\u5177\u680f\u7684\u5143\u7d20\u90fd\u7528\u56fe\u6807\u8868\u793a<br \/>\n    action1-&gt;setIcon(QIcon(&#034;:\/rose.jpg&#034;));<br \/>\n    action2-&gt;setIcon(QIcon(&#034;:\/rose.jpg&#034;));<\/p>\n<p>    \/\/\u7ed9\u5de5\u5177\u680f\u4e0a\u7684\u5143\u7d20\u8bbe\u7f6e\u56fe\u6807\u4f1a\u5bfc\u81f4\u6587\u672c\u88ab\u8986\u76d6&#xff0c;\u56e0\u6b64\u53ef\u4ee5\u7ed9\u6bcf\u4e2a\u5143\u7d20\u8bbe\u7f6e\u4e00\u4e2a\u63d0\u793a\u4fe1\u606f&#xff0c;\u9f20\u6807\u60ac\u505c\u5230\u5bf9\u5e94\u5143\u7d20\u5c31\u663e\u793a\u63d0\u793a\u4fe1\u606f<br \/>\n    \/\/\u5b9e\u9645\u4e0a\u5c31\u7b97\u4e0d\u8bbe\u7f6e\u63d0\u793a\u4fe1\u606f&#xff0c;\u4e5f\u6709\u9ed8\u8ba4\u7684\u63d0\u793a\u4fe1\u606f&#xff0c;\u5373action\u539f\u6765\u7684\u6587\u672c<br \/>\n    action1-&gt;setToolTip(&#034;\u8fd9\u662f\u9009\u98791&#034;);<br \/>\n    action2-&gt;setToolTip(&#034;\u8fd9\u662f\u9009\u98792&#034;);<\/p>\n<p>    \/\/\u628aQAction\u5bf9\u8c61\u6dfb\u52a0\u5230\u5de5\u5177\u680f\u4e2d<br \/>\n    tb-&gt;addAction(action1);<br \/>\n    tb-&gt;addAction(action2);<\/p>\n<p>}<\/p>\n<p><span style=\"color:#0d0016\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"498\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260207090603-6987007be4915.png\" width=\"801\" \/><\/span><\/p>\n<h3 id=\"%E8%8F%9C%E5%8D%95%E6%A0%8F%E5%92%8C%E5%B7%A5%E5%85%B7%E6%A0%8F%E7%BB%93%E5%90%88%E4%BD%BF%E7%94%A8\"><span style=\"color:#0d0016\">\u83dc\u5355\u680f\u548c\u5de5\u5177\u680f\u7ed3\u5408\u4f7f\u7528<\/span><\/h3>\n<p>MainWindow::MainWindow(QWidget *parent)<br \/>\n    : QMainWindow(parent)<br \/>\n    , ui(new Ui::MainWindow)<br \/>\n{<br \/>\n    ui-&gt;setupUi(this);<\/p>\n<p>    \/\/\u521b\u5efa\u5de5\u5177\u680f\u5bf9\u8c61<br \/>\n    QToolBar* tb &#061; new QToolBar();<br \/>\n    this-&gt;addToolBar(tb);<\/p>\n<p>    \/\/\u6dfb\u52a0\u83dc\u5355\u680f\u5bf9\u8c61<br \/>\n    QMenuBar* mb &#061; this-&gt;menuBar();<br \/>\n    this-&gt;setMenuBar(mb);<\/p>\n<p>    \/\/\u521b\u5efaQAction<br \/>\n    QAction * action1 &#061; new QAction(&#034;\u9009\u98791&#034;);<br \/>\n    QAction * action2 &#061; new QAction(&#034;\u9009\u98792&#034;);<\/p>\n<p>    \/\/\u628aQAction\u5bf9\u8c61\u6dfb\u52a0\u5230\u5de5\u5177\u680f\u4e2d<br \/>\n    tb-&gt;addAction(action1);<br \/>\n    tb-&gt;addAction(action2);<\/p>\n<p>    \/\/\u628aQAction\u5bf9\u8c61\u6dfb\u52a0\u5230\u83dc\u5355\u680f\u4e2d<br \/>\n    mb-&gt;addAction(action1);<br \/>\n    mb-&gt;addAction(action2);<\/p>\n<p>} <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"310\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260207090604-6987007c2f794.png\" width=\"800\" \/><\/p>\n<p><span style=\"color:#0d0016\">\u540c\u4e00\u4e2aaction\u5143\u7d20\u88ab\u83dc\u5355\u680f\u548c\u5de5\u5177\u680f\u540c\u65f6\u5305\u542b&#xff0c;\u90a3\u4e48\u4f1a\u4e0d\u4f1a\u5bfc\u81f4\u5bf9\u8c61\u6811\u4e0a\u4e00\u4e2a\u8282\u70b9\u6709\u4e24\u4e2a\u7236\u8282\u70b9&#xff1f;\u6216\u8005\u4e00\u4e2a\u8282\u70b9\u91ca\u653e\u4e24\u6b21\u5462&#xff1f;\u4e0d\u4f1a\u7684&#xff0c;Qt\u5e2e\u6211\u4eec\u5904\u7406\u597d\u4e86\u3002<\/span><\/p>\n<h3 id=\"%E8%AE%BE%E7%BD%AE%E5%A4%9A%E4%B8%AA%E5%B7%A5%E5%85%B7%E6%A0%8F\"><span style=\"color:#0d0016\">\u8bbe\u7f6e\u591a\u4e2a\u5de5\u5177\u680f<\/span><\/h3>\n<p>MainWindow::MainWindow(QWidget *parent)<br \/>\n    : QMainWindow(parent)<br \/>\n    , ui(new Ui::MainWindow)<br \/>\n{<br \/>\n    ui-&gt;setupUi(this);<\/p>\n<p>    \/\/\u6dfb\u52a0\u5de5\u5177\u680f\u5bf9\u8c61<br \/>\n    QToolBar* tb &#061; new QToolBar();<br \/>\n    this-&gt;addToolBar(tb);<\/p>\n<p>    QToolBar* tb2 &#061; new QToolBar();<br \/>\n    this-&gt;addToolBar(tb);<\/p>\n<p>    \/\/\u521b\u5efaQAction<br \/>\n    QAction * action1 &#061; new QAction(&#034;\u9009\u98791&#034;);<br \/>\n    QAction * action2 &#061; new QAction(&#034;\u9009\u98792&#034;);<\/p>\n<p>    \/\/\u628aQAction\u5bf9\u8c61\u6dfb\u52a0\u5230\u5de5\u5177\u680f\u4e2d<br \/>\n    tb-&gt;addAction(action1);<br \/>\n    tb-&gt;addAction(action2);<\/p>\n<p>    tb2-&gt;addAction(action1);<br \/>\n    tb2-&gt;addAction(action2);<br \/>\n}<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"549\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260207090604-6987007c60e5b.png\" width=\"814\" \/><\/p>\n<h3 id=\"%E5%B7%A5%E5%85%B7%E6%A0%8F%E7%9A%84%E7%A7%BB%E5%8A%A8%E8%AE%BE%E7%BD%AE\"><span style=\"color:#0d0016\">\u5de5\u5177\u680f\u7684\u79fb\u52a8\u8bbe\u7f6e<\/span><\/h3>\n<p><span style=\"color:#fe2c24\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u53ef\u4ee5\u5c06\u5de5\u5177\u680f\u62d6\u52a8\u5230\u4e0a\u4e0b\u5de6\u53f3\u56db\u4e2a\u65b9\u5411\u5e76\u505c\u9760\u5728\u7a97\u53e3\u8fb9\u6cbf&#xff0c;\u4ee5\u53ca\u6d6e\u52a8\u5728\u7a97\u53e3\u5185\u90e8<\/span><span style=\"color:#0d0016\">\u3002<\/span><\/p>\n<p>MainWindow::MainWindow(QWidget *parent)<br \/>\n    : QMainWindow(parent)<br \/>\n    , ui(new Ui::MainWindow)<br \/>\n{<br \/>\n    ui-&gt;setupUi(this);<\/p>\n<p>    \/\/\u6dfb\u52a0\u5de5\u5177\u680f\u5bf9\u8c61<br \/>\n    QToolBar* tb &#061; new QToolBar();<br \/>\n    this-&gt;addToolBar(Qt::LeftToolBarArea,tb);\/\/\u5728\u6dfb\u52a0\u5de5\u5177\u680f\u7684\u65f6\u5019\u53ef\u4ee5\u8bbe\u7f6e\u5de5\u5177\u680f\u7684\u521d\u59cb\u4f4d\u7f6e<\/p>\n<p>    \/\/\u521b\u5efaQAction<br \/>\n    QAction * action1 &#061; new QAction(&#034;\u9009\u98791&#034;);<br \/>\n    QAction * action2 &#061; new QAction(&#034;\u9009\u98792&#034;);<\/p>\n<p>    \/\/\u628aQAction\u5bf9\u8c61\u6dfb\u52a0\u5230\u5de5\u5177\u680f\u4e2d<br \/>\n    tb-&gt;addAction(action1);<br \/>\n    tb-&gt;addAction(action2);<\/p>\n<p>    \/\/\u8bbe\u7f6e\u5de5\u5177\u680f\u53ea\u5141\u8bb8\u5728\u5de6\u8fb9\u548c\u53f3\u8fb9\u505c\u9760\u4ee5\u53ca\u6d6e\u52a8<br \/>\n    tb-&gt;setAllowedAreas(Qt::LeftToolBarArea | Qt::RightToolBarArea);<br \/>\n    \/\/\u8bbe\u7f6e\u5de5\u5177\u680f\u4e0d\u5141\u8bb8\u6d6e\u52a8<br \/>\n    tb-&gt;setFloatable(false);<br \/>\n    \/\/\u8bbe\u7f6e\u5de5\u5177\u680f\u4e0d\u5141\u8bb8\u79fb\u52a8, \u56fa\u5b9a\u4f4f\u4e86<br \/>\n    tb-&gt;setMovable(false);<\/p>\n<p>}<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"212\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260207090604-6987007cae0d3.png\" width=\"742\" \/><\/p>\n<hr \/>\n<h2 id=\"%E7%8A%B6%E6%80%81%E6%A0%8F%EF%BC%88Status%20Bar%EF%BC%89\"><span style=\"color:#0d0016\">\u72b6\u6001\u680f&#xff08;Status Bar&#xff09;<\/span><\/h2>\n<p><span style=\"color:#0d0016\">\u72b6\u6001\u680f\u4e5f\u662f\u52fe\u9009ui\u6587\u4ef6\u540e\u9ed8\u8ba4\u751f\u6210\u7684&#xff0c;\u8bbe\u7f6e\u72b6\u6001\u680f\u7684\u65f6\u5019\u8981\u6ce8\u610f\u5185\u5b58\u6cc4\u6f0f\u3002<\/span><\/p>\n<p>MainWindow::MainWindow(QWidget *parent)<br \/>\n    : QMainWindow(parent)<br \/>\n    , ui(new Ui::MainWindow)<br \/>\n{<br \/>\n    ui-&gt;setupUi(this);<\/p>\n<p>    \/\/\u6dfb\u52a0\u72b6\u6001\u680f\u5bf9\u8c61<br \/>\n    QStatusBar * sb &#061; this-&gt;statusBar();<br \/>\n    this-&gt;setStatusBar(sb);<\/p>\n<p>    \/\/\u76f4\u63a5\u8ba9\u72b6\u6001\u680f\u5c55\u793a\u6587\u672c,\u53ef\u4ee5timeout&#xff0c;\u5230\u671f\u81ea\u52a8\u4e0d\u5728\u663e\u793a\u6587\u672c&#xff0c;\u5982\u679ctimeout\u4e3a0\u8868\u793a\u4e00\u76f4\u5c55\u793a<br \/>\n    \/\/sb-&gt;showMessage(&#034;\u8fd9\u662f\u4e00\u4e2a\u72b6\u6001\u6d88\u606f&#034;,1000);<\/p>\n<p>    \/\/\u7ed9\u72b6\u6001\u680f\u6dfb\u52a0\u6807\u7b7e\u63a7\u4ef6,\u53ef\u4ee5\u5728\u6dfb\u52a0\u7684\u65f6\u5019\u8bbe\u7f6e\u62c9\u5347\u7cfb\u6570<br \/>\n    QLabel* label1 &#061; new QLabel(&#034;\u54c8\u54c8\u54c8&#034;);<br \/>\n    sb-&gt;addWidget(label1,1);<br \/>\n    QLabel* label2 &#061; new QLabel(&#034;\u563f\u563f\u563f&#034;);<br \/>\n    sb-&gt;addWidget(label2,2);<\/p>\n<p>    \/\/\u7ed9\u72b6\u6001\u680f\u6dfb\u52a0\u6309\u94ae\u63a7\u4ef6&#xff0c;\u8fd9\u6b21\u6211\u4eec\u4ece\u53f3\u5f80\u5de6\u6dfb\u52a0<br \/>\n    QPushButton* button &#061; new QPushButton(&#034;\u6309\u94ae&#034;);<br \/>\n    sb-&gt;addPermanentWidget(button);\/\/\u8c03\u7528\u8fd9\u4e2a\u51fd\u6570\u5c31\u8868\u793a\u4ece\u53f3\u5f80\u5de6\u6dfb\u52a0<\/p>\n<p>    \/\/\u7ed9\u72b6\u6001\u680f\u6dfb\u52a0\u8fdb\u5ea6\u6761<br \/>\n    QProgressBar* p &#061; new QProgressBar();<br \/>\n    p-&gt;setRange(0,100);<br \/>\n    p-&gt;setValue(50);<br \/>\n    sb-&gt;addWidget(p);<br \/>\n}<\/p>\n<hr \/>\n<h2 id=\"QDockWidget\"><span style=\"color:#0d0016\">QDockWidget<\/span><\/h2>\n<p><span style=\"color:#0d0016\">QDockWidget\u662f\u4e00\u4e2a\u6d6e\u52a8\u7a97\u53e3\u63a7\u4ef6&#xff0c;\u76f8\u5f53\u4e8e\u72ec\u7acb\u7684\u65b0\u7a97\u53e3\u3002\u4e0d\u8fc7\u9700\u8981\u6ce8\u610f\u7684\u662f&#xff0c;<\/span><span style=\"color:#fe2c24\">QDockWidget\u9ed8\u8ba4\u53ea\u80fd\u6dfb\u52a0\u4e00\u4e2a\u63a7\u4ef6&#xff0c;\u56e0\u6b64\u5982\u679c\u60f3\u8981\u5728\u6d6e\u52a8\u7a97\u53e3\u4e0a\u8bbe\u7f6e\u66f4\u591a\u6837\u5f0f\u9700\u8981\u5148\u521b\u5efa\u4e00\u4e2aQWidget\u5e76\u628a\u63a7\u4ef6\u8bbe\u7f6e\u5176\u4e2d&#xff0c;\u7136\u540e\u53ea\u8981\u628aQWidget\u5bf9\u8c61\u8bbe\u7f6e\u5230QDockWidget\u4e2d\u53bb\u5373\u53ef<\/span><span style=\"color:#0d0016\">\u3002<\/span><\/p>\n<p>MainWindow::MainWindow(QWidget *parent)<br \/>\n    : QMainWindow(parent)<br \/>\n    , ui(new Ui::MainWindow)<br \/>\n{<br \/>\n    ui-&gt;setupUi(this);<\/p>\n<p>    \/\/\u6dfb\u52a0\u4e00\u4e2a\u6d6e\u52a8\u7a97\u53e3\u5bf9\u8c61<br \/>\n    QDockWidget* widget &#061; new QDockWidget();<br \/>\n    this-&gt;addDockWidget(Qt::LeftDockWidgetArea,widget);\/\/\u6dfb\u52a0\u7684\u65f6\u5019\u8981\u6307\u5b9a\u65b0\u7a97\u53e3\u7684\u521d\u59cb\u505c\u9760\u4f4d\u7f6e<\/p>\n<p>    \/\/\u7ed9\u6d6e\u52a8\u7a97\u53e3\u8bbe\u7f6e\u7a97\u53e3\u6807\u9898<br \/>\n    widget-&gt;setWindowTitle(&#034;\u6d6e\u52a8\u7a97\u53e3&#034;);<\/p>\n<p>    \/\/\u521b\u5efa\u4e00\u4e2a\u7a97\u53e3\u5bf9\u8c61<br \/>\n    QWidget* qwidget &#061; new QWidget();<br \/>\n    \/\/\u628aQWidget\u5bf9\u8c61\u8bbe\u7f6e\u8fdb\u6d6e\u52a8\u7a97\u53e3\u53bb<br \/>\n    widget-&gt;setWidget(qwidget);<\/p>\n<p>    \/\/\u7136\u540e\u6211\u4eec\u5c31\u53ef\u4ee5\u5728Qwidget\u4e2d\u6dfb\u52a0\u66f4\u591a\u63a7\u4ef6\u4e86<\/p>\n<p>    \/\/\u521b\u5efa\u4e00\u4e2a\u5e03\u5c40\u7ba1\u7406\u5668\u5e76\u6dfb\u52a0\u5230QWidget\u4e2d\u53bb<br \/>\n    QVBoxLayout* layout &#061; new QVBoxLayout();<br \/>\n    qwidget-&gt;setLayout(layout);<\/p>\n<p>    \/\/\u5728\u5e03\u5c40\u7ba1\u7406\u5668\u4e2d\u6dfb\u52a0\u63a7\u4ef6<br \/>\n    layout-&gt;addWidget(new QLabel(&#034;\u8fd9\u662f\u4e00\u4e2a\u6807\u7b7e&#034;));<br \/>\n    layout-&gt;addWidget(new QPushButton(&#034;\u6309\u94ae&#034;));<\/p>\n<p>    \/\/\u8fd8\u53ef\u4ee5\u7ed9\u6d6e\u52a8\u7a97\u53e3\u8bbe\u7f6e\u4ec0\u4e48\u4f4d\u7f6e\u53ef\u4ee5\u505c\u9760<br \/>\n    widget-&gt;setAllowedAreas(Qt::LeftDockWidgetArea | Qt::TopDockWidgetArea);<br \/>\n}<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"757\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260207090604-6987007ce47b8.png\" width=\"835\" \/><\/p>\n<hr \/>\n<\/p>\n<\/p>\n<\/p>\n<\/p>\n<\/p>\n<\/p>\n<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u5f55<br \/>\nQMainWindow<br \/>\n\u83dc\u5355\u680f&#xff08;Menu Bar&#xff09;<br \/>\n\u6dfb\u52a0\u83dc\u5355\u680f&#xff0c;\u6dfb\u52a0\u83dc\u5355&#xff0c;\u6dfb\u52a0\u83dc\u5355\u9879&#xff0c;\u5e76\u4e3a\u83dc\u5355\u9879\u8bbe\u7f6e\u89e6\u53d1\u4e8b\u4ef6&#xff08;\u69fd\u51fd\u6570&#xff09;<br \/>\n\u7ed9\u83dc\u5355&#xff0c;\u83dc\u5355\u9879\u6dfb\u52a0\u5feb\u6377\u952e<br \/>\n\u6dfb\u52a0\u5b50\u83dc\u5355<br \/>\n\u7ed9\u83dc\u5355\u9879\u4e4b\u95f4\u6dfb\u52a0\u5206\u5272\u7ebf<br \/>\n\u7ed9\u83dc\u5355\/\u83dc\u5355\u9879\u6dfb\u52a0\u56fe\u6807<br \/>\n\u9898\u5916\u8bdd\u2014\u2014\u521b\u5efa\u83dc\u5355\u680f\u7684\u5185\u5b58\u6cc4\u6f0f<br \/>\n\u5de5\u5177\u680f&#xff08;QToolBar&#xff09;<br \/>\n\u521b\u5efa\u5de5\u5177\u680f&#xff0c;\u7ed9\u5de5\u5177\u680f\u6dfb\u52a0actio<\/p>\n","protected":false},"author":2,"featured_media":73433,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[218,190],"topic":[],"class_list":["post-73446","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-qt","tag-190"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>QT\u2014\u2014QMainWindow - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/73446.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"QT\u2014\u2014QMainWindow - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u76ee\u5f55 QMainWindow \u83dc\u5355\u680f&#xff08;Menu Bar&#xff09; \u6dfb\u52a0\u83dc\u5355\u680f&#xff0c;\u6dfb\u52a0\u83dc\u5355&#xff0c;\u6dfb\u52a0\u83dc\u5355\u9879&#xff0c;\u5e76\u4e3a\u83dc\u5355\u9879\u8bbe\u7f6e\u89e6\u53d1\u4e8b\u4ef6&#xff08;\u69fd\u51fd\u6570&#xff09; \u7ed9\u83dc\u5355&#xff0c;\u83dc\u5355\u9879\u6dfb\u52a0\u5feb\u6377\u952e \u6dfb\u52a0\u5b50\u83dc\u5355 \u7ed9\u83dc\u5355\u9879\u4e4b\u95f4\u6dfb\u52a0\u5206\u5272\u7ebf \u7ed9\u83dc\u5355\/\u83dc\u5355\u9879\u6dfb\u52a0\u56fe\u6807 \u9898\u5916\u8bdd\u2014\u2014\u521b\u5efa\u83dc\u5355\u680f\u7684\u5185\u5b58\u6cc4\u6f0f \u5de5\u5177\u680f&#xff08;QToolBar&#xff09; \u521b\u5efa\u5de5\u5177\u680f&#xff0c;\u7ed9\u5de5\u5177\u680f\u6dfb\u52a0actio\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/73446.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-02-07T09:06:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260207090602-6987007a397ae.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/73446.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/73446.html\",\"name\":\"QT\u2014\u2014QMainWindow - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-02-07T09:06:06+00:00\",\"dateModified\":\"2026-02-07T09:06:06+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/73446.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/73446.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/73446.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"QT\u2014\u2014QMainWindow\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"QT\u2014\u2014QMainWindow - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/73446.html","og_locale":"zh_CN","og_type":"article","og_title":"QT\u2014\u2014QMainWindow - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u76ee\u5f55 QMainWindow \u83dc\u5355\u680f&#xff08;Menu Bar&#xff09; \u6dfb\u52a0\u83dc\u5355\u680f&#xff0c;\u6dfb\u52a0\u83dc\u5355&#xff0c;\u6dfb\u52a0\u83dc\u5355\u9879&#xff0c;\u5e76\u4e3a\u83dc\u5355\u9879\u8bbe\u7f6e\u89e6\u53d1\u4e8b\u4ef6&#xff08;\u69fd\u51fd\u6570&#xff09; \u7ed9\u83dc\u5355&#xff0c;\u83dc\u5355\u9879\u6dfb\u52a0\u5feb\u6377\u952e \u6dfb\u52a0\u5b50\u83dc\u5355 \u7ed9\u83dc\u5355\u9879\u4e4b\u95f4\u6dfb\u52a0\u5206\u5272\u7ebf \u7ed9\u83dc\u5355\/\u83dc\u5355\u9879\u6dfb\u52a0\u56fe\u6807 \u9898\u5916\u8bdd\u2014\u2014\u521b\u5efa\u83dc\u5355\u680f\u7684\u5185\u5b58\u6cc4\u6f0f \u5de5\u5177\u680f&#xff08;QToolBar&#xff09; \u521b\u5efa\u5de5\u5177\u680f&#xff0c;\u7ed9\u5de5\u5177\u680f\u6dfb\u52a0actio","og_url":"https:\/\/www.wsisp.com\/helps\/73446.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-02-07T09:06:06+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260207090602-6987007a397ae.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/73446.html","url":"https:\/\/www.wsisp.com\/helps\/73446.html","name":"QT\u2014\u2014QMainWindow - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-02-07T09:06:06+00:00","dateModified":"2026-02-07T09:06:06+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/73446.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/73446.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/73446.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"QT\u2014\u2014QMainWindow"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/73446","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=73446"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/73446\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/73433"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=73446"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=73446"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=73446"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=73446"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}