|
@@ -399,7 +399,11 @@ bool ctkSortFilterActionsProxyModel::filterAcceptsRow(int source_row, const QMod
|
|
|
void ctkRichTextItemDelegate::paint(QPainter* painter, const QStyleOptionViewItem & option,
|
|
|
const QModelIndex &index) const
|
|
|
{
|
|
|
+#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
|
|
|
QStyleOptionViewItemV4 options = option;
|
|
|
+#else
|
|
|
+ QStyleOptionViewItem options = option;
|
|
|
+#endif
|
|
|
initStyleOption(&options, index);
|
|
|
if (! Qt::mightBeRichText(options.text))
|
|
|
{
|
|
@@ -428,7 +432,11 @@ void ctkRichTextItemDelegate::paint(QPainter* painter, const QStyleOptionViewIte
|
|
|
QSize ctkRichTextItemDelegate::sizeHint(const QStyleOptionViewItem & option,
|
|
|
const QModelIndex & index)const
|
|
|
{
|
|
|
+#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
|
|
|
QStyleOptionViewItemV4 options = option;
|
|
|
+#else
|
|
|
+ QStyleOptionViewItem options = option;
|
|
|
+#endif
|
|
|
initStyleOption(&options, index);
|
|
|
if (! Qt::mightBeRichText(options.text))
|
|
|
{
|