Add kinetic scrolling.

This commit is contained in:
Sergio Martínez Portela 2021-04-03 01:29:17 +02:00
parent 6a71f342f0
commit 74cb24ae97

View File

@ -6,9 +6,8 @@ import sys
import time import time
from PySide2.QtCore import QObject, QThread, Signal, Slot from PySide2.QtCore import QObject, QThread, Signal, Slot
from PySide2.QtWidgets import (QApplication, QDialog, QGroupBox, QHBoxLayout, from PySide2.QtWidgets import (QApplication, QDialog, QLabel, QLineEdit, QProgressBar, QScrollArea, QTabBar,
QLabel, QLineEdit, QProgressBar, QPushButton, QVBoxLayout, QFrame, QScroller)
QScrollArea, QTabBar, QVBoxLayout, QSplitter, QFrame)
import doc_manager import doc_manager
@ -50,6 +49,9 @@ class Dialog(QDialog):
self.results = QScrollArea(widgetResizable=True) self.results = QScrollArea(widgetResizable=True)
layout.addWidget(self.results) layout.addWidget(self.results)
QScroller.grabGesture(
self.results.viewport(), QScroller.LeftMouseButtonGesture,
)
# Options # Options
self.tabBar = QTabBar(shape=QTabBar.RoundedSouth) self.tabBar = QTabBar(shape=QTabBar.RoundedSouth)