什么是QAbstractView在QT(这个语句)? [英] what is QAbstractView in QT (this statement)?

查看:302
本文介绍了什么是QAbstractView在QT(这个语句)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的表格视图中禁用编辑。我遇到了主题,表示您可以执行以下操作

  tableView.setEditTriggers(QAbstractView :: NoEditTriggers);我的问题是什么是QAbstractView这里?




$ b < h2_lin>解决方案

这似乎是一个错字,应该阅读 QAbstractItemView ,它是QTableView的基础类,其中 EditTriggers 枚举(其中NoEdittriggers是的元素)。


I am attempting to disable editing in my table view. I came across this thread which states that you could do the following

tableView.setEditTriggers(QAbstractView::NoEditTriggers);

My question is what is the QAbstractView here ?

解决方案

that seems to be a typo and should read QAbstractItemView, which is the baseclass of QTableView where the EditTriggers enum (which NoEdittriggers is an element of) is declared.

这篇关于什么是QAbstractView在QT(这个语句)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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