使用QTCreator自动生成设置器/ getter? [英] Auto-generate setters/getters with QTCreator?

查看:1029
本文介绍了使用QTCreator自动生成设置器/ getter?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尽管有一些搜索,我不能找到一种方法来自动生成getter和setter的C ++类,使用QT Creator 2.3.1。
你会知道一些方法吗?

Despite some searchs, I wasn't able to find a way to auto-generate getters and setters for a C++ class, using QT Creator 2.3.1. Would you guys know some way to do so ?

推荐答案

$ c> Refactor 然后生成Getter和Setter成员函数,完成后:)

Do a right click on your member then Refactor then Generate Getter and Setter member function and you're done :)

在Qt Creator 3.2.x上,创建成员,然后点击它,然后按 alt + 输入

On Qt Creator 3.2.x, create the member, then click on it and press alt+Enter :

这篇关于使用QTCreator自动生成设置器/ getter?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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