如何在qt4设计器中创建自定义插槽? [英] How do I create a custom slot in qt4 designer?

查看:131
本文介绍了如何在qt4设计器中创建自定义插槽?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我使用信号/槽编辑器对话框时,我必须从现有的槽列表中选择。所以问题是如何创建一个自定义命名的槽?

Whenever I use the signal/slot editor dialog box, I have to choose from the existing list of slots. So the question is how do I create a custom named slot?

推荐答案

不幸的是这是不可能的Qt4。

Unfortunately this is not possible in Qt4.

在Qt3中,您可以创建自定义插槽,然后在ui.h文件中实现。但是,Qt4不使用此文件,因此不支持自定义插槽。

In Qt3 you could create custom slots which where then implemented in the ui.h file. However, Qt4 does not use this file so custom slots are not supported.

有关这个问题的一些讨论在 QtForum

There is some discussion of this issue over on QtForum

这篇关于如何在qt4设计器中创建自定义插槽?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆