mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-23 14:22:06 +08:00
20 lines
345 B
C++
20 lines
345 B
C++
#pragma once
|
|
|
|
#include <QScrollArea>
|
|
|
|
class ScrollView : public QScrollArea {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit ScrollView(QWidget *w = nullptr, QWidget *parent = nullptr);
|
|
protected:
|
|
void hideEvent(QHideEvent *e) override;
|
|
|
|
public slots:
|
|
void setLastScrollPosition();
|
|
void restoreScrollPosition();
|
|
|
|
private:
|
|
int lastScrollPosition = 0;
|
|
};
|