summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qcombobox.h
diff options
context:
space:
mode:
authorThorbjørn Lund Martsum <tmartsum@gmail.com>2020-07-15 09:24:20 +0200
committerThorbjørn Lund Martsum <tmartsum@gmail.com>2020-07-31 14:58:54 +0200
commit24d60cb64d2d2d677612d8f517031b38c685ee7b (patch)
treeb453a9a0b1a5d47aef4ae13ea08291f4e13f65f5 /src/widgets/widgets/qcombobox.h
parent9c0f448f5a4e2e96e9b801c751c0a145c0eb6dad (diff)
Make initStyleOption virtual for various classes
Often a simple change in the styleoptions is needed in e.g a paintEvent, but it was impossible without copying the whole paint-function which is not always trivial and also wouldn't be kept up-to-date if it was changed in Qt. The initStyleOption is similar to viewOptions in QAbstractTableView and it is handy that this function is virtual. Furthermore QStyledItemDelegate::initStyleOption is already virtual. This change only makes initStyleOption virtual for public classes. [ChangeLog][QtWidgets] InitStyleOption has been made virtual in public Qt classes to make override of stylebehavior more simple. Change-Id: I38974c6d4dd0793ca5976ecf3aa28892215a1579 Task-number: QTBUG-77642 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Diffstat (limited to 'src/widgets/widgets/qcombobox.h')
-rw-r--r--src/widgets/widgets/qcombobox.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/widgets/qcombobox.h b/src/widgets/widgets/qcombobox.h
index 1e518fb2c0..75dbb1183d 100644
--- a/src/widgets/widgets/qcombobox.h
+++ b/src/widgets/widgets/qcombobox.h
@@ -230,7 +230,7 @@ protected:
void contextMenuEvent(QContextMenuEvent *e) override;
#endif // QT_NO_CONTEXTMENU
void inputMethodEvent(QInputMethodEvent *) override;
- void initStyleOption(QStyleOptionComboBox *option) const;
+ virtual void initStyleOption(QStyleOptionComboBox *option) const;
protected: