using QQuickItem::fontPolicy available since Qt 6.7
This commit is contained in:
parent
33a482505a
commit
57162cdff1
@ -414,14 +414,10 @@ bool QskItem::isTabFence() const
|
||||
return d_func()->isTabFence;
|
||||
}
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 6, 7, 0 )
|
||||
|
||||
void QskItem::setFocusPolicy( Qt::FocusPolicy policy )
|
||||
{
|
||||
/*
|
||||
Qt::FocusPolicy has always been there with widgets, got lost with
|
||||
Qt/Quick and has been reintroduced with Qt/Quick Controls 2 ( QC2 ).
|
||||
Unfortunately this was done by adding code on top instead of fixing
|
||||
the foundation.
|
||||
*/
|
||||
Q_D( QskItem );
|
||||
if ( policy != d->focusPolicy )
|
||||
{
|
||||
@ -454,6 +450,14 @@ Qt::FocusPolicy QskItem::focusPolicy() const
|
||||
return static_cast< Qt::FocusPolicy >( policy );
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
/*
|
||||
shifting the activeFocusItem before removing it from the tab focus
|
||||
chain is not done by QQuickItem::setFocusPolicy. TODO ...
|
||||
*/
|
||||
#endif
|
||||
|
||||
void QskItem::setWheelEnabled( bool on )
|
||||
{
|
||||
Q_D( QskItem );
|
||||
|
@ -29,8 +29,10 @@ class QSK_EXPORT QskItem : public QQuickItem
|
||||
Q_PROPERTY( bool polishOnParentResize READ polishOnParentResize
|
||||
WRITE setPolishOnParentResize NOTIFY itemFlagsChanged FINAL )
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 6, 7, 0 )
|
||||
Q_PROPERTY( Qt::FocusPolicy focusPolicy READ focusPolicy
|
||||
WRITE setFocusPolicy NOTIFY focusPolicyChanged )
|
||||
#endif
|
||||
|
||||
Q_PROPERTY( bool wheelEnabled READ isWheelEnabled
|
||||
WRITE setWheelEnabled NOTIFY wheelEnabledChanged )
|
||||
@ -87,8 +89,10 @@ class QSK_EXPORT QskItem : public QQuickItem
|
||||
void setPolishOnParentResize( bool );
|
||||
bool polishOnParentResize() const;
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 6, 7, 0 )
|
||||
void setFocusPolicy( Qt::FocusPolicy );
|
||||
Qt::FocusPolicy focusPolicy() const;
|
||||
#endif
|
||||
|
||||
void setTabFence( bool );
|
||||
bool isTabFence() const;
|
||||
@ -119,7 +123,9 @@ class QSK_EXPORT QskItem : public QQuickItem
|
||||
|
||||
Q_SIGNALS:
|
||||
void wheelEnabledChanged( bool );
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 6, 7, 0 )
|
||||
void focusPolicyChanged( Qt::FocusPolicy );
|
||||
#endif
|
||||
|
||||
void itemFlagsChanged();
|
||||
void updateFlagsChanged( UpdateFlags );
|
||||
|
Loading…
x
Reference in New Issue
Block a user