找回密码
 立即注册
收起左侧

快速入门书上的代码,没看懂,帮帮忙

2
回复
5895
查看
[复制链接]
累计签到:14 天
连续签到:1 天
来源: 2014-3-20 20:18:05 显示全部楼层 |阅读模式
1Qter豆
class StringListModel : public QAbstractListModel
{   
Q_OBJECT
public:    StringListModel(const QStringList &strings, QObject *parent=0)   
            
:QAbstractListModel(parent), stringList(strings){}   
int rowCount(const QModelIndex &parent = QModelIndex()) const;   
QVariant data(const QModelIndex &index, int role) const;   
QVariant headerData(int section, Qt::Orientation orientation,                        
int role = Qt::DisplayRole) const;
private:   
QStringList stringList;
signals:   
public slots:   
};
谁能解释的详细一些,还有就是类中还能定义类吗?

最佳答案

查看完整内容

你还是先学C++基础吧,这样比较好
回复

使用道具 举报

累计签到:76 天
连续签到:1 天
2014-3-20 20:18:06 显示全部楼层
你还是先学C++基础吧,这样比较好
回复

使用道具 举报

累计签到:1571 天
连续签到:1 天
2014-3-28 21:08:48 显示全部楼层
这个需要把一些基础知识搞懂,不然很难理解的。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

公告
可以关注我们的微信公众号yafeilinux_friends获取最新动态,或者加入QQ会员群进行交流:190741849、186601429(已满) 我知道了