[pim/pimcommon] src/pimcommon/widgets: Fix rectangle

Laurent Montel <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 001f981a9bbab176b9e6987d8395324affd46dbe by Laurent Montel.
Committed on 14/08/2026 at 21:03.
Pushed by mlaurent into branch 'master'.

Fix rectangle

M  +1    -1    src/pimcommon/widgets/customtreeview.cpp

https://invent.kde.org/pim/pimcommon/-/commit/001f981a9bbab176b9e6987d8395324affd46dbe

diff --git a/src/pimcommon/widgets/customtreeview.cpp b/src/pimcommon/widgets/customtreeview.cpp
index 0a78adfc..8112a80e 100644
--- a/src/pimcommon/widgets/customtreeview.cpp
+++ b/src/pimcommon/widgets/customtreeview.cpp
@@ -77,7 +77,7 @@ void CustomTreeView::paintEvent(QPaintEvent *event)
         }
         p.setPen(mTextColor);
 
-        p.drawText(QRect(0, 0, width(), height()), Qt::AlignCenter, mDefaultText);
+        p.drawText(viewport()->rect(), Qt::AlignCenter, mDefaultText);
     } else {
         QTreeWidget::paintEvent(event);
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.