简体   繁体   English

更改Qt菜单栏上的插槽(带有图像)

[英]Changing Slots on Qt Menu Bar (with image)

this is more of a functionality question than programming question but I can't find any other idiot operators like me out there that are having the same problem as me, or haven't figured it out themselves. 这更多的是功能问题,而不是编程问题,但是我找不到其他像我一样的白痴操作员,他们和我有同样的问题,或者自己也没有弄清楚。

I've got a good basic understanding of CLI C++ so I want to get into the Qt Framework. 我对CLI C ++有很好的基本了解,所以我想进入Qt框架。 I'm using their tutorials to get started... http://qt-project.org/doc/qt-5.1/qtdoc/gettingstartedqt.html#adding-menu-items 我正在使用他们的教程入门... http://qt-project.org/doc/qt-5.1/qtdoc/gettingstartedqt.html#adding-menu-items

The tutorial says that all I need is to "right-click an action and select Go to slot > triggered()." 本教程说,我所需要的只是“右键单击一个动作,然后选择转到插槽> Triggered()”。

The image below shows in red circles two of the primary places I've tried right clicking. 下图以红色圆圈显示了我尝试右键单击的两个主要位置。 I've also tried going through the menu and looking for things but to no avail. 我也尝试过菜单,寻找东西,但无济于事。 (Question continued below picture.) (下面的问题继续。)

https://i1148.photobucket.com/albums/o572/slassen/StackOverflow/54cc9f53-57a1-4bba-b3a2-38ced2f72ee8.jpg

Does anyone know what I am doing wrong here or am I reading this wrong? 有人知道我在这里做错了吗,还是我读错了? Thanks in advance. 提前致谢。 FYI the open button and save button under central widget is for the Open and Save buttons I added, NOT for the menu toolbar open and save functions. 仅供参考,中央小部件下的“打开”按钮和“保存”按钮用于我添加的“打开”和“保存”按钮,不适用于菜单工具栏的“打开和保存”功能。

Near the bottom of Qt Creator find the tabs "Action Editor" and "Signals & Slots Editor". 在Qt Creator底部附近,找到选项卡“ Action Editor”和“ Signals&Slots Editor”。 Click the "Action Editor" tab to show a list of all the actions in your UI. 单击“动作编辑器”选项卡,以显示UI中所有动作的列表。 You should be able to right-click these items and select "Go to slot...". 您应该能够右键单击这些项目,然后选择“转到插槽...”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM