UI: Cleanup Qt for Qt6
This changes cleans up some deprecated functions that were removed in Qt6. Some are placed behind version ifdefs and others are replaced for their non-deprecated Qt5 version.
This commit is contained in:
parent
40f99da8a2
commit
513bcb8e35
11 changed files with 48 additions and 11 deletions
|
|
@ -147,7 +147,7 @@ SourceTreeItem::SourceTreeItem(SourceTree *tree_, OBSSceneItem sceneitem_)
|
|||
void SourceTreeItem::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
QStyleOption opt;
|
||||
opt.init(this);
|
||||
opt.initFrom(this);
|
||||
QPainter p(this);
|
||||
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
|
||||
|
||||
|
|
@ -305,7 +305,11 @@ void SourceTreeItem::mouseDoubleClickEvent(QMouseEvent *event)
|
|||
}
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
void SourceTreeItem::enterEvent(QEnterEvent *event)
|
||||
#else
|
||||
void SourceTreeItem::enterEvent(QEvent *event)
|
||||
#endif
|
||||
{
|
||||
QWidget::enterEvent(event);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue