From: Peter Penz Date: Wed, 18 Jul 2007 21:05:47 +0000 (+0000) Subject: QAbstractItemView::viewOptions() only returns an instance of the class QStyleOptionVi... X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/a6a454c8587949e6fc954d4cd2f2eddf838c6d47 QAbstractItemView::viewOptions() only returns an instance of the class QStyleOptionViewItem, so the text wrapping property of QStyleOptionViewItemV3 will never be set -> check whether wrapping has been enabled inside QListView svn path=/trunk/KDE/kdebase/apps/; revision=689676 --- diff --git a/src/kcategorizedview.cpp b/src/kcategorizedview.cpp index c931c0f79..d250c42c9 100644 --- a/src/kcategorizedview.cpp +++ b/src/kcategorizedview.cpp @@ -622,6 +622,11 @@ void KCategorizedView::paintEvent(QPaintEvent *event) QStyleOptionViewItemV3 option = viewOptions(); option.widget = this; + if (wordWrap()) + { + option.features |= QStyleOptionViewItemV2::WrapText; + } + QPainter painter(viewport()); QRect area = event->rect(); const bool focus = (hasFocus() || viewport()->hasFocus()) &&