From 0c7a631a0465dd36d6c29a720114c80804287f40 Mon Sep 17 00:00:00 2001 From: Geir Vattekar Date: Thu, 17 Feb 2011 15:31:22 +0100 Subject: Doc: Work on QHeaderView::sectionPosition() Task-number: QTBUG-17119 Reviewed-by: David Boddie --- src/gui/itemviews/qheaderview.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gui/itemviews/qheaderview.cpp b/src/gui/itemviews/qheaderview.cpp index c857670..2ccf792 100644 --- a/src/gui/itemviews/qheaderview.cpp +++ b/src/gui/itemviews/qheaderview.cpp @@ -643,8 +643,12 @@ int QHeaderView::sectionSize(int logicalIndex) const } /*! - Returns the section position of the given \a logicalIndex, or -1 if the - section is hidden. + + Returns the section position of the given \a logicalIndex, or -1 + if the section is hidden. The position is measured in pixels from + the first visible item's top-left corner to the top-left corner of + the item with \a logicalIndex. The measurement is along the x-axis + for horizontal headers and along the y-axis for vertical headers. \sa sectionViewportPosition() */ -- cgit v0.12 From cc08d7e5d9f952fd78406c73d59752f9842c8ca6 Mon Sep 17 00:00:00 2001 From: Geir Vattekar Date: Thu, 17 Feb 2011 17:49:58 +0100 Subject: Doc: itemAt for QTreeWidget/QListWidget are relative to the viewport Task-number: QTBUG-17516 --- src/gui/itemviews/qlistwidget.cpp | 7 ++++++- src/gui/itemviews/qtreewidget.cpp | 6 ++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/gui/itemviews/qlistwidget.cpp b/src/gui/itemviews/qlistwidget.cpp index 94e3b76..61a935f 100644 --- a/src/gui/itemviews/qlistwidget.cpp +++ b/src/gui/itemviews/qlistwidget.cpp @@ -1500,7 +1500,9 @@ void QListWidget::setCurrentRow(int row, QItemSelectionModel::SelectionFlags com } /*! - Returns a pointer to the item at the coordinates \a p. + Returns a pointer to the item at the coordinates \a p. The coordinates + are relative to the list widget's \l{QAbstractScrollArea::}{viewport()}. + */ QListWidgetItem *QListWidget::itemAt(const QPoint &p) const { @@ -1514,6 +1516,9 @@ QListWidgetItem *QListWidget::itemAt(const QPoint &p) const \overload Returns a pointer to the item at the coordinates (\a x, \a y). + The coordinates are relative to the list widget's + \l{QAbstractScrollArea::}{viewport()}. + */ diff --git a/src/gui/itemviews/qtreewidget.cpp b/src/gui/itemviews/qtreewidget.cpp index 4db29d6..2ea9a43 100644 --- a/src/gui/itemviews/qtreewidget.cpp +++ b/src/gui/itemviews/qtreewidget.cpp @@ -2830,7 +2830,8 @@ void QTreeWidget::setCurrentItem(QTreeWidgetItem *item, int column, /*! - Returns a pointer to the item at the coordinates \a p. + Returns a pointer to the item at the coordinates \a p. The coordinates + are relative to the tree widget's \l{QAbstractScrollArea::}{viewport()}. \sa visualItemRect() */ @@ -2844,7 +2845,8 @@ QTreeWidgetItem *QTreeWidget::itemAt(const QPoint &p) const \fn QTreeWidgetItem *QTreeWidget::itemAt(int x, int y) const \overload - Returns a pointer to the item at the coordinates (\a x, \a y). + Returns a pointer to the item at the coordinates (\a x, \a y). The coordinates + are relative to the tree widget's \l{QAbstractScrollArea::}{viewport()}. */ /*! -- cgit v0.12 From cdefba000d1abc7c611c7f495e7a7409710038b5 Mon Sep 17 00:00:00 2001 From: Geir Vattekar Date: Fri, 18 Feb 2011 09:32:58 +0100 Subject: Doc: Small update to QHistoryState::setDefaultState() Task-number: QTBUG-17522 --- src/corelib/statemachine/qhistorystate.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/corelib/statemachine/qhistorystate.cpp b/src/corelib/statemachine/qhistorystate.cpp index 350c1a0..7093c32 100644 --- a/src/corelib/statemachine/qhistorystate.cpp +++ b/src/corelib/statemachine/qhistorystate.cpp @@ -168,6 +168,9 @@ QAbstractState *QHistoryState::defaultState() const /*! Sets this history state's default state to be the given \a state. \a state must be a sibling of this history state. + + Note that this function does not set \a state as the initial state + of its parent. */ void QHistoryState::setDefaultState(QAbstractState *state) { -- cgit v0.12