summaryrefslogtreecommitdiffstats
path: root/src/widgets/itemviews
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/itemviews')
-rw-r--r--src/widgets/itemviews/qabstractitemview.cpp38
-rw-r--r--src/widgets/itemviews/qdatawidgetmapper.cpp32
-rw-r--r--src/widgets/itemviews/qdirmodel.cpp10
-rw-r--r--src/widgets/itemviews/qheaderview.cpp116
-rw-r--r--src/widgets/itemviews/qheaderview_p.h20
-rw-r--r--src/widgets/itemviews/qitemdelegate.cpp58
-rw-r--r--src/widgets/itemviews/qitemeditorfactory.cpp22
-rw-r--r--src/widgets/itemviews/qlistview.cpp12
-rw-r--r--src/widgets/itemviews/qlistwidget.cpp12
-rw-r--r--src/widgets/itemviews/qstyleditemdelegate.cpp58
-rw-r--r--src/widgets/itemviews/qtableview.cpp16
-rw-r--r--src/widgets/itemviews/qtablewidget.cpp12
-rw-r--r--src/widgets/itemviews/qtreeview.cpp40
-rw-r--r--src/widgets/itemviews/qtreewidget.cpp14
14 files changed, 233 insertions, 227 deletions
diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp
index ff3de308e5..8530e2c23e 100644
--- a/src/widgets/itemviews/qabstractitemview.cpp
+++ b/src/widgets/itemviews/qabstractitemview.cpp
@@ -251,34 +251,34 @@ void QAbstractItemViewPrivate::_q_scrollerStateChanged()
\table
\header
- \o Keys
- \o Functionality
+ \li Keys
+ \li Functionality
\row
- \o Arrow keys
- \o Changes the current item and selects it.
+ \li Arrow keys
+ \li Changes the current item and selects it.
\row
- \o Ctrl+Arrow keys
- \o Changes the current item but does not select it.
+ \li Ctrl+Arrow keys
+ \li Changes the current item but does not select it.
\row
- \o Shift+Arrow keys
- \o Changes the current item and selects it. The previously
+ \li Shift+Arrow keys
+ \li Changes the current item and selects it. The previously
selected item(s) is not deselected.
\row
- \o Ctr+Space
- \o Toggles selection of the current item.
+ \li Ctr+Space
+ \li Toggles selection of the current item.
\row
- \o Tab/Backtab
- \o Changes the current item to the next/previous item.
+ \li Tab/Backtab
+ \li Changes the current item to the next/previous item.
\row
- \o Home/End
- \o Selects the first/last item in the model.
+ \li Home/End
+ \li Selects the first/last item in the model.
\row
- \o Page up/Page down
- \o Scrolls the rows shown up/down by the number of
+ \li Page up/Page down
+ \li Scrolls the rows shown up/down by the number of
visible rows in the view.
\row
- \o Ctrl+A
- \o Selects all items in the model.
+ \li Ctrl+A
+ \li Selects all items in the model.
\endtable
Note that the above table assumes that the
@@ -1428,7 +1428,7 @@ bool QAbstractItemView::dragEnabled() const
\value DragOnly The view supports dragging of its own items
\value DropOnly The view accepts drops
\value DragDrop The view supports both dragging and dropping
- \value InternalMove The view accepts move (\bold{not copy}) operations only
+ \value InternalMove The view accepts move (\b{not copy}) operations only
from itself.
Note that the model used needs to provide support for drag and drop operations.
diff --git a/src/widgets/itemviews/qdatawidgetmapper.cpp b/src/widgets/itemviews/qdatawidgetmapper.cpp
index e4eca4287b..2f7b1f7ecb 100644
--- a/src/widgets/itemviews/qdatawidgetmapper.cpp
+++ b/src/widgets/itemviews/qdatawidgetmapper.cpp
@@ -279,11 +279,11 @@ void QDataWidgetMapperPrivate::_q_modelDestroyed()
Let us assume that we have an item model named \c{model} with the following contents:
\table
- \row \o 1 \o Qt Norway \o Oslo
- \row \o 2 \o Qt Australia \o Brisbane
- \row \o 3 \o Qt USA \o Palo Alto
- \row \o 4 \o Qt China \o Beijing
- \row \o 5 \o Qt Germany \o Berlin
+ \row \li 1 \li Qt Norway \li Oslo
+ \row \li 2 \li Qt Australia \li Brisbane
+ \row \li 3 \li Qt USA \li Palo Alto
+ \row \li 4 \li Qt China \li Beijing
+ \row \li 5 \li Qt Germany \li Berlin
\endtable
The following code will map the columns of the model to widgets called \c mySpinBox,
@@ -478,11 +478,11 @@ QModelIndex QDataWidgetMapper::rootIndex() const
\snippet doc/src/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp 1
- \bold{Notes:}
+ \b{Notes:}
\list
- \o If the \a widget is already mapped to a section, the
+ \li If the \a widget is already mapped to a section, the
old mapping will be replaced by the new one.
- \o Only one-to-one mappings between sections and widgets are allowed.
+ \li Only one-to-one mappings between sections and widgets are allowed.
It is not possible to map a single section to multiple widgets, or to
map a single widget to multiple sections.
\endlist
@@ -781,11 +781,11 @@ void QDataWidgetMapper::clearMapping()
Use Qt::Horizontal for tabular data that looks like this:
\table
- \row \o 1 \o Qt Norway \o Oslo
- \row \o 2 \o Qt Australia \o Brisbane
- \row \o 3 \o Qt USA \o Silicon Valley
- \row \o 4 \o Qt China \o Beijing
- \row \o 5 \o Qt Germany \o Berlin
+ \row \li 1 \li Qt Norway \li Oslo
+ \row \li 2 \li Qt Australia \li Brisbane
+ \row \li 3 \li Qt USA \li Silicon Valley
+ \row \li 4 \li Qt China \li Beijing
+ \row \li 5 \li Qt Germany \li Berlin
\endtable
If the orientation is set to Qt::Vertical, a widget is mapped to
@@ -796,9 +796,9 @@ void QDataWidgetMapper::clearMapping()
Use Qt::Vertical for tabular data that looks like this:
\table
- \row \o 1 \o 2 \o 3 \o 4 \o 5
- \row \o Qt Norway \o Qt Australia \o Qt USA \o Qt China \o Qt Germany
- \row \o Oslo \o Brisbane \o Silicon Valley \o Beijing \i Berlin
+ \row \li 1 \li 2 \li 3 \li 4 \li 5
+ \row \li Qt Norway \li Qt Australia \li Qt USA \li Qt China \li Qt Germany
+ \row \li Oslo \li Brisbane \li Silicon Valley \li Beijing \li Berlin
\endtable
Changing the orientation clears all existing mappings.
diff --git a/src/widgets/itemviews/qdirmodel.cpp b/src/widgets/itemviews/qdirmodel.cpp
index ee097e5c41..490c272e39 100644
--- a/src/widgets/itemviews/qdirmodel.cpp
+++ b/src/widgets/itemviews/qdirmodel.cpp
@@ -1011,12 +1011,12 @@ QModelIndex QDirModel::mkdir(const QModelIndex &parent, const QString &name)
/*!
Removes the directory corresponding to the model item \a index in the
- directory model and \bold{deletes the corresponding directory from the
+ directory model and \b{deletes the corresponding directory from the
file system}, returning true if successful. If the directory cannot be
removed, false is returned.
\warning This function deletes directories from the file system; it does
- \bold{not} move them to a location where they can be recovered.
+ \b{not} move them to a location where they can be recovered.
\sa remove()
*/
@@ -1046,11 +1046,11 @@ bool QDirModel::rmdir(const QModelIndex &index)
}
/*!
- Removes the model item \a index from the directory model and \bold{deletes the
+ Removes the model item \a index from the directory model and \b{deletes the
corresponding file from the file system}, returning true if successful. If the
item cannot be removed, false is returned.
- \warning This function deletes files from the file system; it does \bold{not}
+ \warning This function deletes files from the file system; it does \b{not}
move them to a location where they can be recovered.
\sa rmdir()
@@ -1134,7 +1134,7 @@ QIcon QDirModel::fileIcon(const QModelIndex &index) const
/*!
Returns the file information for the specified model \a index.
- \bold{Note:} If the model index represents a symbolic link in the
+ \b{Note:} If the model index represents a symbolic link in the
underlying filing system, the file information returned will contain
information about the symbolic link itself, regardless of whether
resolveSymlinks is enabled or not.
diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp
index 5d2aceaade..eac543d37d 100644
--- a/src/widgets/itemviews/qheaderview.cpp
+++ b/src/widgets/itemviews/qheaderview.cpp
@@ -490,7 +490,7 @@ void QHeaderView::setOffset(int newOffset)
void QHeaderView::setOffsetToSectionPosition(int visualSectionNumber)
{
Q_D(QHeaderView);
- if (visualSectionNumber > -1 && visualSectionNumber < d->sectionCount) {
+ if (visualSectionNumber > -1 && visualSectionNumber < d->sectionCount()) {
int position = d->headerSectionPosition(d->adjustedVisualIndex(visualSectionNumber));
setOffset(position);
}
@@ -597,7 +597,7 @@ int QHeaderView::visualIndexAt(int position) const
int vposition = position;
d->executePostedLayout();
d->executePostedResize();
- const int count = d->sectionCount;
+ const int count = d->sectionCount();
if (count < 1)
return -1;
@@ -728,7 +728,7 @@ void QHeaderView::moveSection(int from, int to)
Q_D(QHeaderView);
d->executePostedLayout();
- if (from < 0 || from >= d->sectionCount || to < 0 || to >= d->sectionCount)
+ if (from < 0 || from >= d->sectionCount() || to < 0 || to >= d->sectionCount())
return;
if (from == to) {
@@ -828,7 +828,7 @@ void QHeaderView::swapSections(int first, int second)
if (first == second)
return;
d->executePostedLayout();
- if (first < 0 || first >= d->sectionCount || second < 0 || second >= d->sectionCount)
+ if (first < 0 || first >= d->sectionCount() || second < 0 || second >= d->sectionCount())
return;
int firstSize = d->headerSectionSize(first);
@@ -965,7 +965,7 @@ bool QHeaderView::isSectionHidden(int logicalIndex) const
{
Q_D(const QHeaderView);
d->executePostedLayout();
- if (logicalIndex >= d->sectionHidden.count() || logicalIndex < 0 || logicalIndex >= d->sectionCount)
+ if (logicalIndex >= d->sectionHidden.count() || logicalIndex < 0 || logicalIndex >= d->sectionCount())
return false;
int visual = visualIndex(logicalIndex);
Q_ASSERT(visual != -1);
@@ -1038,7 +1038,7 @@ int QHeaderView::count() const
//Q_ASSERT(d->sectionCount == d->headerSectionCount());
// ### this may affect the lazy layout
d->executePostedLayout();
- return d->sectionCount;
+ return d->sectionCount();
}
/*!
@@ -1057,11 +1057,11 @@ int QHeaderView::visualIndex(int logicalIndex) const
return -1;
d->executePostedLayout();
if (d->visualIndices.isEmpty()) { // nothing has been moved, so we have no mapping
- if (logicalIndex < d->sectionCount)
+ if (logicalIndex < d->sectionCount())
return logicalIndex;
} else if (logicalIndex < d->visualIndices.count()) {
int visual = d->visualIndices.at(logicalIndex);
- Q_ASSERT(visual < d->sectionCount);
+ Q_ASSERT(visual < d->sectionCount());
return visual;
}
return -1;
@@ -1079,7 +1079,7 @@ int QHeaderView::visualIndex(int logicalIndex) const
int QHeaderView::logicalIndex(int visualIndex) const
{
Q_D(const QHeaderView);
- if (visualIndex < 0 || visualIndex >= d->sectionCount)
+ if (visualIndex < 0 || visualIndex >= d->sectionCount())
return -1;
return d->logicalIndex(visualIndex);
}
@@ -1293,14 +1293,14 @@ void QHeaderView::setSortIndicator(int logicalIndex, Qt::SortOrder order)
d->sortIndicatorSection = logicalIndex;
d->sortIndicatorOrder = order;
- if (logicalIndex >= d->sectionCount) {
+ if (logicalIndex >= d->sectionCount()) {
emit sortIndicatorChanged(logicalIndex, order);
return; // nothing to do
}
if (old != logicalIndex
&& ((logicalIndex >= 0 && resizeMode(logicalIndex) == ResizeToContents)
- || old >= d->sectionCount || (old >= 0 && resizeMode(old) == ResizeToContents))) {
+ || old >= d->sectionCount() || (old >= 0 && resizeMode(old) == ResizeToContents))) {
resizeSections();
d->viewport->update();
} else {
@@ -1655,15 +1655,14 @@ void QHeaderView::sectionsInserted(const QModelIndex &parent,
Q_D(QHeaderView);
if (parent != d->root)
return; // we only handle changes in the top level
- int oldCount = d->sectionCount;
+ int oldCount = d->sectionCount();
d->invalidateCachedSizeHint();
// add the new sections
int insertAt = logicalFirst;
-
int insertCount = logicalLast - logicalFirst + 1;
- d->sectionCount += insertCount;
+
QHeaderViewPrivate::SectionSpan span(d->defaultSectionSize, d->globalResizeMode);
d->sectionStartposRecalc = true;
@@ -1684,9 +1683,9 @@ void QHeaderView::sectionsInserted(const QModelIndex &parent,
// update resize mode section counts
if (d->globalResizeMode == Stretch)
- d->stretchSections = d->sectionCount;
+ d->stretchSections = d->sectionCount();
else if (d->globalResizeMode == ResizeToContents)
- d->contentsSections = d->sectionCount;
+ d->contentsSections = d->sectionCount();
// clear selection cache
d->sectionSelected.clear();
@@ -1723,7 +1722,7 @@ void QHeaderView::sectionsInserted(const QModelIndex &parent,
for (int i = 0; i < logicalFirst; ++i)
if (isSectionHidden(i))
newHiddenSectionSize[i] = d->hiddenSectionSize[i];
- for (int j = logicalLast + 1; j < d->sectionCount; ++j)
+ for (int j = logicalLast + 1; j < d->sectionCount(); ++j)
if (isSectionHidden(j))
newHiddenSectionSize[j] = d->hiddenSectionSize[j - insertCount];
d->hiddenSectionSize = newHiddenSectionSize;
@@ -1762,14 +1761,14 @@ void QHeaderViewPrivate::updateHiddenSections(int logicalFirst, int logicalLast)
for (int i = 0; i < logicalFirst; ++i)
if (q->isSectionHidden(i))
newHiddenSectionSize[i] = hiddenSectionSize[i];
- for (int j = logicalLast + 1; j < sectionCount; ++j)
+ for (int j = logicalLast + 1; j < sectionCount(); ++j)
if (q->isSectionHidden(j))
newHiddenSectionSize[j - changeCount] = hiddenSectionSize[j];
hiddenSectionSize = newHiddenSectionSize;
// remove sections from sectionsHidden
if (!sectionHidden.isEmpty()) {
- const int newsize = qMin(sectionCount - changeCount, sectionHidden.size());
+ const int newsize = qMin(sectionCount() - changeCount, sectionHidden.size());
QBitArray newSectionHidden(newsize);
for (int j = 0, k = 0; j < sectionHidden.size(); ++j) {
const int logical = logicalIndex(j);
@@ -1788,7 +1787,7 @@ void QHeaderViewPrivate::_q_sectionsRemoved(const QModelIndex &parent,
if (parent != root)
return; // we only handle changes in the top level
if (qMin(logicalFirst, logicalLast) < 0
- || qMax(logicalLast, logicalFirst) >= sectionCount)
+ || qMax(logicalLast, logicalFirst) >= sectionCount())
return;
int oldCount = q->count();
int changeCount = logicalLast - logicalFirst + 1;
@@ -1802,8 +1801,8 @@ void QHeaderViewPrivate::_q_sectionsRemoved(const QModelIndex &parent,
if (logicalFirst == logicalLast) { // Remove just one index.
int l = logicalFirst;
int visual = visualIndices.at(l);
- Q_ASSERT(sectionCount == logicalIndices.count());
- for (int v = 0; v < sectionCount; ++v) {
+ Q_ASSERT(sectionCount() == logicalIndices.count());
+ for (int v = 0; v < sectionCount(); ++v) {
if (v > visual) {
int logical = logicalIndices.at(v);
--(visualIndices[logical]);
@@ -1837,7 +1836,6 @@ void QHeaderViewPrivate::_q_sectionsRemoved(const QModelIndex &parent,
}
// ### handle sectionSelection (sectionHidden is handled by updateHiddenSections)
}
- sectionCount -= changeCount;
// update sorting column
if (sortIndicatorSection >= logicalFirst) {
@@ -1848,7 +1846,7 @@ void QHeaderViewPrivate::_q_sectionsRemoved(const QModelIndex &parent,
}
// if we only have the last section (the "end" position) left, the header is empty
- if (sectionCount <= 0)
+ if (sectionCount() <= 0)
clear();
invalidateCachedSizeHint();
emit q->sectionCountChanged(oldCount, q->count());
@@ -1877,7 +1875,7 @@ void QHeaderViewPrivate::_q_layoutChanged()
Q_Q(QHeaderView);
viewport->update();
if (persistentHiddenSections.isEmpty() || modelIsEmpty()) {
- if (modelSectionCount() != sectionCount)
+ if (modelSectionCount() != sectionCount())
q->initializeSections();
persistentHiddenSections.clear();
return;
@@ -1894,7 +1892,7 @@ void QHeaderViewPrivate::_q_layoutChanged()
: index.row());
q->setSectionHidden(logical, true);
oldSectionHidden.setBit(logical, false);
- } else if (!sectionCountChanged && (modelSectionCount() != sectionCount)) {
+ } else if (!sectionCountChanged && (modelSectionCount() != sectionCount())) {
sectionCountChanged = true;
break;
}
@@ -1918,7 +1916,7 @@ void QHeaderViewPrivate::_q_layoutChanged()
void QHeaderView::initializeSections()
{
Q_D(QHeaderView);
- const int oldCount = d->sectionCount;
+ const int oldCount = d->sectionCount();
const int newCount = d->modelSectionCount();
if (newCount <= 0) {
d->clear();
@@ -1927,7 +1925,7 @@ void QHeaderView::initializeSections()
const int min = qBound(0, oldCount, newCount - 1);
initializeSections(min, newCount - 1);
if (stretchLastSection()) // we've already gotten the size hint
- d->lastSectionSize = sectionSize(logicalIndex(d->sectionCount - 1));
+ d->lastSectionSize = sectionSize(logicalIndex(d->sectionCount() - 1));
//make sure we update the hidden sections
if (newCount < oldCount)
@@ -1947,13 +1945,14 @@ void QHeaderView::initializeSections(int start, int end)
Q_ASSERT(end >= 0);
d->invalidateCachedSizeHint();
+ int oldCount = d->sectionCount();
- if (end + 1 < d->sectionCount) {
+ if (end + 1 < d->sectionCount()) {
int newCount = end + 1;
- d->removeSectionsFromSpans(newCount, d->sectionCount - 1);
+ d->removeSectionsFromSpans(newCount, d->sectionCount() - 1);
if (!d->hiddenSectionSize.isEmpty()) {
- if (d->sectionCount - newCount > d->hiddenSectionSize.count()) {
- for (int i = end + 1; i < d->sectionCount; ++i)
+ if (oldCount - newCount > d->hiddenSectionSize.count()) {
+ for (int i = end + 1; i < d->sectionCount(); ++i)
d->hiddenSectionSize.remove(i);
} else {
QHash<int, int>::iterator it = d->hiddenSectionSize.begin();
@@ -1967,14 +1966,13 @@ void QHeaderView::initializeSections(int start, int end)
}
}
- int oldCount = d->sectionCount;
- d->sectionCount = end + 1;
+ int newSectionCount = end + 1;
if (!d->logicalIndices.isEmpty()) {
- if (oldCount <= d->sectionCount) {
- d->logicalIndices.resize(d->sectionCount);
- d->visualIndices.resize(d->sectionCount);
- for (int i = oldCount; i < d->sectionCount; ++i) {
+ if (oldCount <= newSectionCount) {
+ d->logicalIndices.resize(newSectionCount);
+ d->visualIndices.resize(newSectionCount);
+ for (int i = oldCount; i < newSectionCount; ++i) {
d->logicalIndices[i] = i;
d->visualIndices[i] = i;
}
@@ -1982,30 +1980,30 @@ void QHeaderView::initializeSections(int start, int end)
int j = 0;
for (int i = 0; i < oldCount; ++i) {
int v = d->logicalIndices.at(i);
- if (v < d->sectionCount) {
+ if (v < newSectionCount) {
d->logicalIndices[j] = v;
d->visualIndices[v] = j;
j++;
}
}
- d->logicalIndices.resize(d->sectionCount);
- d->visualIndices.resize(d->sectionCount);
+ d->logicalIndices.resize(newSectionCount);
+ d->visualIndices.resize(newSectionCount);
}
}
if (d->globalResizeMode == Stretch)
- d->stretchSections = d->sectionCount;
+ d->stretchSections = newSectionCount;
else if (d->globalResizeMode == ResizeToContents)
- d->contentsSections = d->sectionCount;
+ d->contentsSections = newSectionCount;
if (!d->sectionHidden.isEmpty())
- d->sectionHidden.resize(d->sectionCount);
+ d->sectionHidden.resize(newSectionCount);
- if (d->sectionCount > oldCount)
+ if (newSectionCount > oldCount)
d->createSectionSpan(start, end, (end - start + 1) * d->defaultSectionSize, d->globalResizeMode);
//Q_ASSERT(d->headerLength() == d->length);
- if (d->sectionCount != oldCount)
- emit sectionCountChanged(oldCount, d->sectionCount);
+ if (d->sectionCount() != oldCount)
+ emit sectionCountChanged(oldCount, d->sectionCount());
d->viewport->update();
}
@@ -2996,7 +2994,7 @@ void QHeaderViewPrivate::resizeSections(QHeaderView::ResizeMode globalMode, bool
delayedResize.stop();
executePostedLayout();
- if (sectionCount == 0)
+ if (sectionCount() == 0)
return;
if (resizeRecursionBlock)
@@ -3016,7 +3014,7 @@ void QHeaderViewPrivate::resizeSections(QHeaderView::ResizeMode globalMode, bool
int lengthToStrech = (orientation == Qt::Horizontal ? viewport->width() : viewport->height());
int numberOfStretchedSections = 0;
QList<int> section_sizes;
- for (int i = 0; i < sectionCount; ++i) {
+ for (int i = 0; i < sectionCount(); ++i) {
if (isVisualIndexHidden(i))
continue;
@@ -3060,7 +3058,7 @@ void QHeaderViewPrivate::resizeSections(QHeaderView::ResizeMode globalMode, bool
QHeaderView::ResizeMode previousSectionResizeMode = QHeaderView::Interactive;
// resize each section along the total length
- for (int i = 0; i < sectionCount; ++i) {
+ for (int i = 0; i < sectionCount(); ++i) {
int oldSectionLength = headerSectionSize(i);
int newSectionLength = -1;
QHeaderView::ResizeMode newSectionResizeMode = headerSectionResizeMode(i);
@@ -3107,8 +3105,8 @@ void QHeaderViewPrivate::resizeSections(QHeaderView::ResizeMode globalMode, bool
previousSectionResizeMode = newSectionResizeMode;
}
- createSectionSpan(spanStartSection, sectionCount - 1,
- (sectionCount - spanStartSection) * previousSectionLength,
+ createSectionSpan(spanStartSection, sectionCount() - 1,
+ (sectionCount() - spanStartSection) * previousSectionLength,
previousSectionResizeMode);
//Q_ASSERT(headerLength() == length);
resizeRecursionBlock = false;
@@ -3144,7 +3142,6 @@ void QHeaderViewPrivate::clear()
{
if (state != NoClear) {
length = 0;
- sectionCount = 0;
visualIndices.clear();
logicalIndices.clear();
sectionSelected.clear();
@@ -3205,7 +3202,7 @@ void QHeaderViewPrivate::cascadingResize(int visual, int newSize)
}
// cascade the section size change
- for (int i = visual + 1; i < sectionCount; ++i) {
+ for (int i = visual + 1; i < sectionCount(); ++i) {
if (!sectionIsCascadable(i))
continue;
int currentSectionSize = headerSectionSize(i);
@@ -3261,7 +3258,7 @@ void QHeaderViewPrivate::cascadingResize(int visual, int newSize)
// let the next section get the space from the resized section
if (!sectionResized) {
- for (int i = visual + 1; i < sectionCount; ++i) {
+ for (int i = visual + 1; i < sectionCount(); ++i) {
if (!sectionIsCascadable(i))
continue;
int currentSectionSize = headerSectionSize(i);
@@ -3317,14 +3314,14 @@ void QHeaderViewPrivate::resizeSectionSpan(int visualIndex, int oldSize, int new
int QHeaderViewPrivate::headerSectionSize(int visual) const
{
- if (visual < sectionCount && visual >= 0)
+ if (visual < sectionCount() && visual >= 0)
return sectionSpans.at(visual).sectionSize();
return -1;
}
int QHeaderViewPrivate::headerSectionPosition(int visual) const
{
- if (visual < sectionCount && visual >= 0) {
+ if (visual < sectionCount() && visual >= 0) {
if (sectionStartposRecalc)
recalcSectionStartPos();
return sectionSpans.at(visual).calculated_startpos;
@@ -3416,7 +3413,7 @@ void QHeaderViewPrivate::write(QDataStream &out) const
out << hiddenSectionSize;
out << length;
- out << sectionCount;
+ out << sectionCount();
out << movableSections;
out << clickableSections;
out << highlightSelected;
@@ -3452,7 +3449,8 @@ bool QHeaderViewPrivate::read(QDataStream &in)
in >> hiddenSectionSize;
in >> length;
- in >> sectionCount;
+ int unusedSectionCount; // For compability
+ in >> unusedSectionCount;
in >> movableSections;
in >> clickableSections;
in >> highlightSelected;
diff --git a/src/widgets/itemviews/qheaderview_p.h b/src/widgets/itemviews/qheaderview_p.h
index 2c657221dd..a2b0ef2180 100644
--- a/src/widgets/itemviews/qheaderview_p.h
+++ b/src/widgets/itemviews/qheaderview_p.h
@@ -84,7 +84,6 @@ public:
pressed(-1),
hover(-1),
length(0),
- sectionCount(0),
movableSections(false),
clickableSections(false),
highlightSelected(false),
@@ -137,11 +136,13 @@ public:
inline void prepareSectionSelected() {
if (!selectionModel || !selectionModel->hasSelection())
sectionSelected.clear();
- else if (sectionSelected.count() != sectionCount * 2)
- sectionSelected.fill(false, sectionCount * 2);
+ else if (sectionSelected.count() != sectionCount() * 2)
+ sectionSelected.fill(false, sectionCount() * 2);
else sectionSelected.fill(false);
}
+ inline int sectionCount() const {return sectionSpans.count();}
+
inline bool reverse() const {
return orientation == Qt::Horizontal && q_func()->isRightToLeft();
}
@@ -182,11 +183,11 @@ public:
}
inline void initializeIndexMapping() const {
- if (visualIndices.count() != sectionCount
- || logicalIndices.count() != sectionCount) {
- visualIndices.resize(sectionCount);
- logicalIndices.resize(sectionCount);
- for (int s = 0; s < sectionCount; ++s) {
+ if (visualIndices.count() != sectionCount()
+ || logicalIndices.count() != sectionCount()) {
+ visualIndices.resize(sectionCount());
+ logicalIndices.resize(sectionCount());
+ for (int s = 0; s < sectionCount(); ++s) {
visualIndices[s] = s;
logicalIndices[s] = s;
}
@@ -194,7 +195,7 @@ public:
}
inline void clearCascadingSections() {
- firstCascadingSection = sectionCount;
+ firstCascadingSection = sectionSpans.count();
lastCascadingSection = 0;
cascadingSectionSize.clear();
}
@@ -265,7 +266,6 @@ public:
int hover;
int length;
- int sectionCount;
bool movableSections;
bool clickableSections;
bool highlightSelected;
diff --git a/src/widgets/itemviews/qitemdelegate.cpp b/src/widgets/itemviews/qitemdelegate.cpp
index a5351301a7..419c62ff65 100644
--- a/src/widgets/itemviews/qitemdelegate.cpp
+++ b/src/widgets/itemviews/qitemdelegate.cpp
@@ -44,6 +44,8 @@
#ifndef QT_NO_ITEMVIEWS
#include <qabstractitemmodel.h>
#include <qapplication.h>
+#include <qplatformintegration_qpa.h>
+#include <private/qguiapplication_p.h>
#include <qbrush.h>
#include <qlineedit.h>
#include <qtextedit.h>
@@ -229,12 +231,12 @@ QSizeF QItemDelegatePrivate::doTextLayout(int lineWidth) const
reimplemented here:
\list
- \o createEditor() returns the widget used to change data from the model
+ \li createEditor() returns the widget used to change data from the model
and can be reimplemented to customize editing behavior.
- \o setEditorData() provides the widget with data to manipulate.
- \o updateEditorGeometry() ensures that the editor is displayed correctly
+ \li setEditorData() provides the widget with data to manipulate.
+ \li updateEditorGeometry() ensures that the editor is displayed correctly
with respect to the item view.
- \o setModelData() returns updated data to the model.
+ \li setModelData() returns updated data to the model.
\endlist
The closeEditor() signal indicates that the user has completed editing the data,
@@ -248,28 +250,28 @@ QSizeF QItemDelegatePrivate::doTextLayout(int lineWidth) const
appearance of the delegate as described in the following table.
\table
- \header \o Role \o Accepted Types
+ \header \li Role \li Accepted Types
\omit
- \row \o \l Qt::AccessibleDescriptionRole \o QString
- \row \o \l Qt::AccessibleTextRole \o QString
+ \row \li \l Qt::AccessibleDescriptionRole \li QString
+ \row \li \l Qt::AccessibleTextRole \li QString
\endomit
- \row \o \l Qt::BackgroundRole \o QBrush
- \row \o \l Qt::BackgroundColorRole \o QColor (obsolete; use Qt::BackgroundRole instead)
- \row \o \l Qt::CheckStateRole \o Qt::CheckState
- \row \o \l Qt::DecorationRole \o QIcon, QPixmap and QColor
- \row \o \l Qt::DisplayRole \o QString and types with a string representation
- \row \o \l Qt::EditRole \o See QItemEditorFactory for details
- \row \o \l Qt::FontRole \o QFont
- \row \o \l Qt::SizeHintRole \o QSize
+ \row \li \l Qt::BackgroundRole \li QBrush
+ \row \li \l Qt::BackgroundColorRole \li QColor (obsolete; use Qt::BackgroundRole instead)
+ \row \li \l Qt::CheckStateRole \li Qt::CheckState
+ \row \li \l Qt::DecorationRole \li QIcon, QPixmap and QColor
+ \row \li \l Qt::DisplayRole \li QString and types with a string representation
+ \row \li \l Qt::EditRole \li See QItemEditorFactory for details
+ \row \li \l Qt::FontRole \li QFont
+ \row \li \l Qt::SizeHintRole \li QSize
\omit
- \row \o \l Qt::StatusTipRole \o
+ \row \li \l Qt::StatusTipRole \li
\endomit
- \row \o \l Qt::TextAlignmentRole \o Qt::Alignment
- \row \o \l Qt::ForegroundRole \o QBrush
- \row \o \l Qt::TextColorRole \o QColor (obsolete; use Qt::ForegroundRole instead)
+ \row \li \l Qt::TextAlignmentRole \li Qt::Alignment
+ \row \li \l Qt::ForegroundRole \li QBrush
+ \row \li \l Qt::TextColorRole \li QColor (obsolete; use Qt::ForegroundRole instead)
\omit
- \row \o \l Qt::ToolTipRole
- \row \o \l Qt::WhatsThisRole
+ \row \li \l Qt::ToolTipRole
+ \row \li \l Qt::WhatsThisRole
\endomit
\endtable
@@ -1150,11 +1152,11 @@ QRect QItemDelegate::textRectangle(QPainter * /*painter*/, const QRect &rect,
key press events are handled by default:
\list
- \o \gui Tab
- \o \gui Backtab
- \o \gui Enter
- \o \gui Return
- \o \gui Esc
+ \li \gui Tab
+ \li \gui Backtab
+ \li \gui Enter
+ \li \gui Return
+ \li \gui Esc
\endlist
In the case of \gui Tab, \gui Backtab, \gui Enter and \gui Return
@@ -1224,8 +1226,10 @@ bool QItemDelegate::eventFilter(QObject *object, QEvent *event)
#ifndef QT_NO_DRAGANDDROP
// The window may lose focus during an drag operation.
// i.e when dragging involves the taskbar on Windows.
- if (QDragManager::self() && QDragManager::self()->object != 0)
+ QPlatformDrag *platformDrag = QGuiApplicationPrivate::instance()->platformIntegration()->drag();
+ if (platformDrag && platformDrag->currentDrag()) {
return false;
+ }
#endif
emit commitData(editor);
diff --git a/src/widgets/itemviews/qitemeditorfactory.cpp b/src/widgets/itemviews/qitemeditorfactory.cpp
index 468929a554..b4180c18dd 100644
--- a/src/widgets/itemviews/qitemeditorfactory.cpp
+++ b/src/widgets/itemviews/qitemeditorfactory.cpp
@@ -102,16 +102,16 @@ public:
types and the standard editors provided.
\table
- \header \o Type \o Editor Widget
- \row \o bool \o QComboBox
- \row \o double \o QDoubleSpinBox
- \row \o int \o{1,2} QSpinBox
- \row \o unsigned int
- \row \o QDate \o QDateEdit
- \row \o QDateTime \o QDateTimeEdit
- \row \o QPixmap \o QLabel
- \row \o QString \o QLineEdit
- \row \o QTime \o QTimeEdit
+ \header \li Type \li Editor Widget
+ \row \li bool \li QComboBox
+ \row \li double \li QDoubleSpinBox
+ \row \li int \li{1,2} QSpinBox
+ \row \li unsigned int
+ \row \li QDate \li QDateEdit
+ \row \li QDateTime \li QDateTimeEdit
+ \row \li QPixmap \li QLabel
+ \row \li QString \li QLineEdit
+ \row \li QTime \li QTimeEdit
\endtable
Additional editors can be registered with the registerEditor() function.
@@ -168,7 +168,7 @@ QItemEditorFactory::~QItemEditorFactory()
/*!
Registers an item editor creator specified by \a creator for the given \a userType of data.
- \bold{Note:} The factory takes ownership of the item editor creator and will destroy
+ \b{Note:} The factory takes ownership of the item editor creator and will destroy
it if a new creator for the same type is registered later.
\sa createEditor()
diff --git a/src/widgets/itemviews/qlistview.cpp b/src/widgets/itemviews/qlistview.cpp
index 8d069a8c7e..b00b1073a3 100644
--- a/src/widgets/itemviews/qlistview.cpp
+++ b/src/widgets/itemviews/qlistview.cpp
@@ -108,12 +108,12 @@ QT_BEGIN_NAMESPACE
be rendered as large or small icons depending on their iconSize().
\table 100%
- \row \o \inlineimage windowsxp-listview.png Screenshot of a Windows XP style list view
- \o \inlineimage macintosh-listview.png Screenshot of a Macintosh style table view
- \o \inlineimage plastique-listview.png Screenshot of a Plastique style table view
- \row \o A \l{Windows XP Style Widget Gallery}{Windows XP style} list view.
- \o A \l{Macintosh Style Widget Gallery}{Macintosh style} list view.
- \o A \l{Plastique Style Widget Gallery}{Plastique style} list view.
+ \row \li \inlineimage windowsxp-listview.png Screenshot of a Windows XP style list view
+ \li \inlineimage macintosh-listview.png Screenshot of a Macintosh style table view
+ \li \inlineimage plastique-listview.png Screenshot of a Plastique style table view
+ \row \li A \l{Windows XP Style Widget Gallery}{Windows XP style} list view.
+ \li A \l{Macintosh Style Widget Gallery}{Macintosh style} list view.
+ \li A \l{Plastique Style Widget Gallery}{Plastique style} list view.
\endtable
\section1 Improving Performance
diff --git a/src/widgets/itemviews/qlistwidget.cpp b/src/widgets/itemviews/qlistwidget.cpp
index bb39546ec8..01cb7b4235 100644
--- a/src/widgets/itemviews/qlistwidget.cpp
+++ b/src/widgets/itemviews/qlistwidget.cpp
@@ -1187,12 +1187,12 @@ void QListWidgetPrivate::_q_dataChanged(const QModelIndex &topLeft,
new current item and the item that was previously current.
\table 100%
- \row \o \inlineimage windowsxp-listview.png Screenshot of a Windows XP style list widget
- \o \inlineimage macintosh-listview.png Screenshot of a Macintosh style table widget
- \o \inlineimage plastique-listview.png Screenshot of a Plastique style table widget
- \row \o A \l{Windows XP Style Widget Gallery}{Windows XP style} list widget.
- \o A \l{Macintosh Style Widget Gallery}{Macintosh style} list widget.
- \o A \l{Plastique Style Widget Gallery}{Plastique style} list widget.
+ \row \li \inlineimage windowsxp-listview.png Screenshot of a Windows XP style list widget
+ \li \inlineimage macintosh-listview.png Screenshot of a Macintosh style table widget
+ \li \inlineimage plastique-listview.png Screenshot of a Plastique style table widget
+ \row \li A \l{Windows XP Style Widget Gallery}{Windows XP style} list widget.
+ \li A \l{Macintosh Style Widget Gallery}{Macintosh style} list widget.
+ \li A \l{Plastique Style Widget Gallery}{Plastique style} list widget.
\endtable
\sa QListWidgetItem, QListView, QTreeView, {Model/View Programming},
diff --git a/src/widgets/itemviews/qstyleditemdelegate.cpp b/src/widgets/itemviews/qstyleditemdelegate.cpp
index ca4c684e98..93893afaa8 100644
--- a/src/widgets/itemviews/qstyleditemdelegate.cpp
+++ b/src/widgets/itemviews/qstyleditemdelegate.cpp
@@ -44,6 +44,8 @@
#ifndef QT_NO_ITEMVIEWS
#include <qabstractitemmodel.h>
#include <qapplication.h>
+#include <qplatformintegration_qpa.h>
+#include <private/qguiapplication_p.h>
#include <qbrush.h>
#include <qlineedit.h>
#include <qtextedit.h>
@@ -141,28 +143,28 @@ public:
each of the roles to determine the appearance of items in views.
\table
- \header \o Role \o Accepted Types
+ \header \li Role \li Accepted Types
\omit
- \row \o \l Qt::AccessibleDescriptionRole \o QString
- \row \o \l Qt::AccessibleTextRole \o QString
+ \row \li \l Qt::AccessibleDescriptionRole \li QString
+ \row \li \l Qt::AccessibleTextRole \li QString
\endomit
- \row \o \l Qt::BackgroundRole \o QBrush
- \row \o \l Qt::BackgroundColorRole \o QColor (obsolete; use Qt::BackgroundRole instead)
- \row \o \l Qt::CheckStateRole \o Qt::CheckState
- \row \o \l Qt::DecorationRole \o QIcon, QPixmap, QImage and QColor
- \row \o \l Qt::DisplayRole \o QString and types with a string representation
- \row \o \l Qt::EditRole \o See QItemEditorFactory for details
- \row \o \l Qt::FontRole \o QFont
- \row \o \l Qt::SizeHintRole \o QSize
+ \row \li \l Qt::BackgroundRole \li QBrush
+ \row \li \l Qt::BackgroundColorRole \li QColor (obsolete; use Qt::BackgroundRole instead)
+ \row \li \l Qt::CheckStateRole \li Qt::CheckState
+ \row \li \l Qt::DecorationRole \li QIcon, QPixmap, QImage and QColor
+ \row \li \l Qt::DisplayRole \li QString and types with a string representation
+ \row \li \l Qt::EditRole \li See QItemEditorFactory for details
+ \row \li \l Qt::FontRole \li QFont
+ \row \li \l Qt::SizeHintRole \li QSize
\omit
- \row \o \l Qt::StatusTipRole \o
+ \row \li \l Qt::StatusTipRole \li
\endomit
- \row \o \l Qt::TextAlignmentRole \o Qt::Alignment
- \row \o \l Qt::ForegroundRole \o QBrush
- \row \o \l Qt::TextColorRole \o QColor (obsolete; use Qt::ForegroundRole instead)
+ \row \li \l Qt::TextAlignmentRole \li Qt::Alignment
+ \row \li \l Qt::ForegroundRole \li QBrush
+ \row \li \l Qt::TextColorRole \li QColor (obsolete; use Qt::ForegroundRole instead)
\omit
- \row \o \l Qt::ToolTipRole
- \row \o \l Qt::WhatsThisRole
+ \row \li \l Qt::ToolTipRole
+ \row \li \l Qt::WhatsThisRole
\endomit
\endtable
@@ -209,12 +211,12 @@ public:
following virtual functions must be reimplemented:
\list
- \o createEditor() returns the widget used to change data from the model
+ \li createEditor() returns the widget used to change data from the model
and can be reimplemented to customize editing behavior.
- \o setEditorData() provides the widget with data to manipulate.
- \o updateEditorGeometry() ensures that the editor is displayed correctly
+ \li setEditorData() provides the widget with data to manipulate.
+ \li updateEditorGeometry() ensures that the editor is displayed correctly
with respect to the item view.
- \o setModelData() returns updated data to the model.
+ \li setModelData() returns updated data to the model.
\endlist
The \l{Star Delegate Example}{Star Delegate} example creates
@@ -616,11 +618,11 @@ void QStyledItemDelegate::setItemEditorFactory(QItemEditorFactory *factory)
key press events are handled by default:
\list
- \o \gui Tab
- \o \gui Backtab
- \o \gui Enter
- \o \gui Return
- \o \gui Esc
+ \li \gui Tab
+ \li \gui Backtab
+ \li \gui Enter
+ \li \gui Return
+ \li \gui Esc
\endlist
In the case of \gui Tab, \gui Backtab, \gui Enter and \gui Return
@@ -689,8 +691,10 @@ bool QStyledItemDelegate::eventFilter(QObject *object, QEvent *event)
#ifndef QT_NO_DRAGANDDROP
// The window may lose focus during an drag operation.
// i.e when dragging involves the taskbar on Windows.
- if (QDragManager::self() && QDragManager::self()->object != 0)
+ QPlatformDrag *platformDrag = QGuiApplicationPrivate::instance()->platformIntegration()->drag();
+ if (platformDrag && platformDrag->currentDrag()) {
return false;
+ }
#endif
emit commitData(editor);
diff --git a/src/widgets/itemviews/qtableview.cpp b/src/widgets/itemviews/qtableview.cpp
index 7e6420bb53..d3bc826750 100644
--- a/src/widgets/itemviews/qtableview.cpp
+++ b/src/widgets/itemviews/qtableview.cpp
@@ -980,8 +980,8 @@ void QTableViewPrivate::drawCell(QPainter *painter, const QStyleOptionViewItemV4
later retrieved with \l{QAbstractItemView::}{indexWidget()}.
\table
- \row \o \inlineimage qtableview-resized.png
- \o By default, the cells in a table do not expand to fill the available space.
+ \row \li \inlineimage qtableview-resized.png
+ \li By default, the cells in a table do not expand to fill the available space.
You can make the cells fill the available space by stretching the last
header section. Access the relevant header using horizontalHeader()
@@ -1010,12 +1010,12 @@ void QTableViewPrivate::drawCell(QPainter *painter, const QStyleOptionViewItemV4
its appearance in other styles.
\table 100%
- \row \o \inlineimage windowsxp-tableview.png Screenshot of a Windows XP style table view
- \o \inlineimage macintosh-tableview.png Screenshot of a Macintosh style table view
- \o \inlineimage plastique-tableview.png Screenshot of a Plastique style table view
- \row \o A \l{Windows XP Style Widget Gallery}{Windows XP style} table view.
- \o A \l{Macintosh Style Widget Gallery}{Macintosh style} table view.
- \o A \l{Plastique Style Widget Gallery}{Plastique style} table view.
+ \row \li \inlineimage windowsxp-tableview.png Screenshot of a Windows XP style table view
+ \li \inlineimage macintosh-tableview.png Screenshot of a Macintosh style table view
+ \li \inlineimage plastique-tableview.png Screenshot of a Plastique style table view
+ \row \li A \l{Windows XP Style Widget Gallery}{Windows XP style} table view.
+ \li A \l{Macintosh Style Widget Gallery}{Macintosh style} table view.
+ \li A \l{Plastique Style Widget Gallery}{Plastique style} table view.
\endtable
\sa QTableWidget, {View Classes}, QAbstractItemModel, QAbstractItemView,
diff --git a/src/widgets/itemviews/qtablewidget.cpp b/src/widgets/itemviews/qtablewidget.cpp
index 5932f20327..7ae74640d6 100644
--- a/src/widgets/itemviews/qtablewidget.cpp
+++ b/src/widgets/itemviews/qtablewidget.cpp
@@ -1537,12 +1537,12 @@ QTableWidgetItem &QTableWidgetItem::operator=(const QTableWidgetItem &other)
clear() function.
\table 100%
- \row \o \inlineimage windowsxp-tableview.png Screenshot of a Windows XP style table widget
- \o \inlineimage macintosh-tableview.png Screenshot of a Macintosh style table widget
- \o \inlineimage plastique-tableview.png Screenshot of a Plastique style table widget
- \row \o A \l{Windows XP Style Widget Gallery}{Windows XP style} table widget.
- \o A \l{Macintosh Style Widget Gallery}{Macintosh style} table widget.
- \o A \l{Plastique Style Widget Gallery}{Plastique style} table widget.
+ \row \li \inlineimage windowsxp-tableview.png Screenshot of a Windows XP style table widget
+ \li \inlineimage macintosh-tableview.png Screenshot of a Macintosh style table widget
+ \li \inlineimage plastique-tableview.png Screenshot of a Plastique style table widget
+ \row \li A \l{Windows XP Style Widget Gallery}{Windows XP style} table widget.
+ \li A \l{Macintosh Style Widget Gallery}{Macintosh style} table widget.
+ \li A \l{Plastique Style Widget Gallery}{Plastique style} table widget.
\endtable
\sa QTableWidgetItem, QTableView, {Model/View Programming}
diff --git a/src/widgets/itemviews/qtreeview.cpp b/src/widgets/itemviews/qtreeview.cpp
index 7f5e5964ab..c54c11d0f5 100644
--- a/src/widgets/itemviews/qtreeview.cpp
+++ b/src/widgets/itemviews/qtreeview.cpp
@@ -113,29 +113,29 @@ QT_BEGIN_NAMESPACE
navigate in the view and interact with the contents of items:
\table
- \header \o Key \o Action
- \row \o Up \o Moves the cursor to the item in the same column on
+ \header \li Key \li Action
+ \row \li Up \li Moves the cursor to the item in the same column on
the previous row. If the parent of the current item has no more rows to
navigate to, the cursor moves to the relevant item in the last row
of the sibling that precedes the parent.
- \row \o Down \o Moves the cursor to the item in the same column on
+ \row \li Down \li Moves the cursor to the item in the same column on
the next row. If the parent of the current item has no more rows to
navigate to, the cursor moves to the relevant item in the first row
of the sibling that follows the parent.
- \row \o Left \o Hides the children of the current item (if present)
+ \row \li Left \li Hides the children of the current item (if present)
by collapsing a branch.
- \row \o Minus \o Same as LeftArrow.
- \row \o Right \o Reveals the children of the current item (if present)
+ \row \li Minus \li Same as LeftArrow.
+ \row \li Right \li Reveals the children of the current item (if present)
by expanding a branch.
- \row \o Plus \o Same as RightArrow.
- \row \o Asterisk \o Expands all children of the current item (if present).
- \row \o PageUp \o Moves the cursor up one page.
- \row \o PageDown \o Moves the cursor down one page.
- \row \o Home \o Moves the cursor to an item in the same column of the first
+ \row \li Plus \li Same as RightArrow.
+ \row \li Asterisk \li Expands all children of the current item (if present).
+ \row \li PageUp \li Moves the cursor up one page.
+ \row \li PageDown \li Moves the cursor down one page.
+ \row \li Home \li Moves the cursor to an item in the same column of the first
row of the first top-level item in the model.
- \row \o End \o Moves the cursor to an item in the same column of the last
+ \row \li End \li Moves the cursor to an item in the same column of the last
row of the last top-level item in the model.
- \row \o F2 \o In editable models, this opens the current item for editing.
+ \row \li F2 \li In editable models, this opens the current item for editing.
The Escape key can be used to cancel the editing process and revert
any changes to the data displayed.
\endtable
@@ -145,12 +145,12 @@ QT_BEGIN_NAMESPACE
\endomit
\table 100%
- \row \o \inlineimage windowsxp-treeview.png Screenshot of a Windows XP style tree view
- \o \inlineimage macintosh-treeview.png Screenshot of a Macintosh style tree view
- \o \inlineimage plastique-treeview.png Screenshot of a Plastique style tree view
- \row \o A \l{Windows XP Style Widget Gallery}{Windows XP style} tree view.
- \o A \l{Macintosh Style Widget Gallery}{Macintosh style} tree view.
- \o A \l{Plastique Style Widget Gallery}{Plastique style} tree view.
+ \row \li \inlineimage windowsxp-treeview.png Screenshot of a Windows XP style tree view
+ \li \inlineimage macintosh-treeview.png Screenshot of a Macintosh style tree view
+ \li \inlineimage plastique-treeview.png Screenshot of a Plastique style tree view
+ \row \li A \l{Windows XP Style Widget Gallery}{Windows XP style} tree view.
+ \li A \l{Macintosh Style Widget Gallery}{Macintosh style} tree view.
+ \li A \l{Plastique Style Widget Gallery}{Plastique style} tree view.
\endtable
\section1 Improving Performance
@@ -3146,7 +3146,7 @@ void QTreeViewPrivate::_q_columnsRemoved(const QModelIndex &parent, int start, i
}
/** \internal
- creates and initialize the viewItem structure of the children of the element \i
+ creates and initialize the viewItem structure of the children of the element \li
set \a recursiveExpanding if the function has to expand all the children (called from expandAll)
\a afterIsUninitialized is when we recurse from layout(-1), it means all the items after 'i' are
diff --git a/src/widgets/itemviews/qtreewidget.cpp b/src/widgets/itemviews/qtreewidget.cpp
index cec709a816..156121a533 100644
--- a/src/widgets/itemviews/qtreewidget.cpp
+++ b/src/widgets/itemviews/qtreewidget.cpp
@@ -2376,12 +2376,12 @@ void QTreeWidgetPrivate::_q_dataChanged(const QModelIndex &topLeft,
whether sorting is enabled.
\table 100%
- \row \o \inlineimage windowsxp-treeview.png Screenshot of a Windows XP style tree widget
- \o \inlineimage macintosh-treeview.png Screenshot of a Macintosh style tree widget
- \o \inlineimage plastique-treeview.png Screenshot of a Plastique style tree widget
- \row \o A \l{Windows XP Style Widget Gallery}{Windows XP style} tree widget.
- \o A \l{Macintosh Style Widget Gallery}{Macintosh style} tree widget.
- \o A \l{Plastique Style Widget Gallery}{Plastique style} tree widget.
+ \row \li \inlineimage windowsxp-treeview.png Screenshot of a Windows XP style tree widget
+ \li \inlineimage macintosh-treeview.png Screenshot of a Macintosh style tree widget
+ \li \inlineimage plastique-treeview.png Screenshot of a Plastique style tree widget
+ \row \li A \l{Windows XP Style Widget Gallery}{Windows XP style} tree widget.
+ \li A \l{Macintosh Style Widget Gallery}{Macintosh style} tree widget.
+ \li A \l{Plastique Style Widget Gallery}{Plastique style} tree widget.
\endtable
\sa QTreeWidgetItem, QTreeWidgetItemIterator, QTreeView,
@@ -3263,7 +3263,7 @@ void QTreeWidget::collapseItem(const QTreeWidgetItem *item)
/*!
Clears the tree widget by removing all of its items and selections.
- \bold{Note:} Since each item is removed from the tree widget before being
+ \b{Note:} Since each item is removed from the tree widget before being
deleted, the return value of QTreeWidgetItem::treeWidget() will be invalid
when called from an item's destructor.