开发者

How to add a slot to my main window in Qt builder?

开发者 https://www.devze.com 2022-12-28 15:50 出处:网络
I am using Qt Builder to create a simple window. I used the menu editor to add a menu. Now, I figured out how to connect one of the menu items to the close() method of the main window. My problem is

I am using Qt Builder to create a simple window.

I used the menu editor to add a menu.

Now, I figured out how to connect one of the menu items to the close() method of the main window. My problem is how to add a slot to the main window. Here is what I have:

priva开发者_开发问答te slots:
    void OnAbout();

However, I can't get this method to show up in the 'Signals and Slots Editor'. How can I get it to show up?


I finally figured it out. You have to select the main window and hit F4 to add the function to the slots for the window.

0

精彩评论

暂无评论...
验证码 换一张
取 消