win7 support fixes

wizard added
This commit is contained in:
pokamest 2021-05-18 15:50:52 +03:00
parent 45e5ec76dd
commit 4ba964db47
16 changed files with 2043 additions and 467 deletions

View file

@ -121,6 +121,8 @@ void SlidingStackedWidget::slideInWgtImpl(QWidget * newwidget, enum t_direction
}
else m_active = true;
m_nextWidget = newwidget;
enum t_direction directionhint;
int now = currentIndex(); // currentIndex() is a function inherited from QStackedWidget
int next = indexOf(newwidget);
@ -209,6 +211,18 @@ void SlidingStackedWidget::slideInWgtImpl(QWidget * newwidget, enum t_direction
// that we implement here below in animationDoneSlot.
}
void SlidingStackedWidget::setCurrentWidget(QWidget *w)
{
m_nextWidget = w;
QStackedWidget::setCurrentWidget(w);
}
QWidget *SlidingStackedWidget::nextWidget() const
{
if (m_nextWidget == nullptr) return currentWidget();
return m_nextWidget;
}
void SlidingStackedWidget::animationDoneSlot(void) {
// when ready, call the QStackedWidget slot setCurrentIndex(int)
setCurrentIndex(m_next); // this function is inherited from QStackedWidget