How to connect menu click with action in Qt Creator?

前端 未结 4 1043
天命终不由人
天命终不由人 2020-12-29 01:32

I am completely new to Qt.

I started with a new Qt4 GUI Application.

Using the designer, I have created a menu like so:

File
 - Exit
<         


        
4条回答
  •  感情败类
    2020-12-29 02:07

    I managed to do this in a way that seems much easier. In the Qt Creator Action Editor window, i see an entry for the menu item I clicked. I rt-click that entry and select "Go to slot..." then i select triggered() from the popup and click OK. Qt Creator jumps me to the code it just added.... I put a qDebug statement in there and it works!

提交回复
热议问题