https://bugs.kde.org/show_bug.cgi?id=379036

--- Comment #6 from Martin Koller <kol...@aon.at> ---
Found the bug. When painting, the iconSize member of the style option struct
was not set and defaults to an invalid size. I'm using Qt 5.9.1 if that
matters.

This fixes it:

diff --git a/src/attendeecomboboxdelegate.cpp
b/src/attendeecomboboxdelegate.cpp
index fe8c10f..f13be6d 100644
--- a/src/attendeecomboboxdelegate.cpp
+++ b/src/attendeecomboboxdelegate.cpp
@@ -126,6 +126,7 @@ void AttendeeComboBoxDelegate::paint(QPainter *painter,
const QStyleOptionViewIt
     myOption.rect = option.rect;
     myOption.state = option.state;
     myOption.icon = mEntries[value].first;
+    myOption.iconSize = myOption.icon.actualSize(option.rect.size());

     QApplication::style()->drawControl(QStyle::CE_PushButton, &myOption,
painter);
 }

Would this be ok to commit ?

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to