我正在尝试定位树形小部件的项目。
在文档中查找,我得到:
QTreeWidgetItem * QTreeWidget::itemAt ( const QPoint & p ) const
Returns a pointer to the item at the coordinates p. The coordinates are relative to the tree widget's
viewport()
.
viewport()
函数也没有给出关于viewport
的定义。
那么什么是树形小部件的视口(viewport)?
最佳答案
QTreeWidget 继承自QAbstractScrollArea ,这是定义视口(viewport)的地方:
QAbstractScrollArea is a low-level abstraction of a scrolling area. The area provides a central widget called the viewport, in which the contents of the area is to be scrolled (i.e, the visible parts of the contents are rendered in the viewport).
视口(viewport)本质上是树的可见部分。
关于c++ - 什么是树形小部件的视口(viewport)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16759088/