enum QItemSelectionModel::SelectionFlag
flags QItemSelectionModel::SelectionFlags
前面写了一个是枚举类型,后面这个类型是什么意思?
flags QItemSelectionModel::SelectionFlags这个是不是就导致了函数的定义中需要采用:
QItemSelectionModel::SelectionFlags flags这样的写法?
QItemSelectionModel::SelectionFlags文档中也有QItemSelectionModel::SelectCurrent的描述:
QItemSelectionModel::SelectCurrent
Select | Current
A combination of Select and Current, provided for convenience.
我有些糊涂了,二者的关系是什么?
The SelectionFlags type is a typedef for QFlags<SelectionFlag>. It stores an OR combination of SelectionFlag values. 看文档的时候注意不要漏了,上面这句话已经解释,就是它支持使用 或 操作