Skip to content

Commit 5c29220

Browse files
committed
feat: add scrollable item
1 parent d64d3be commit 5c29220

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

coffee_ws/src/coffee_head/coffee_head/head_tracking.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from dynamixel_sdk_custom_interfaces.srv import GetPosition
1717
from PyQt5.QtWidgets import (QApplication, QMainWindow, QWidget, QVBoxLayout, QHBoxLayout,
1818
QLabel, QPushButton, QCheckBox, QSlider, QComboBox, QGroupBox,
19-
QDoubleSpinBox)
19+
QDoubleSpinBox, QScrollArea)
2020
from PyQt5.QtGui import QImage, QPixmap
2121
from PyQt5.QtCore import Qt, pyqtSignal, QObject, QTimer
2222

@@ -959,9 +959,14 @@ def initUI(self):
959959
self.setWindowTitle('Head Tracking Control')
960960
self.setGeometry(100, 100, 500, 600) # Increased height for additional controls
961961

962+
# Create a scroll area
963+
scroll_area = QScrollArea()
964+
scroll_area.setWidgetResizable(True)
965+
self.setCentralWidget(scroll_area)
966+
962967
# Main widget and layout
963968
main_widget = QWidget()
964-
self.setCentralWidget(main_widget)
969+
scroll_area.setWidget(main_widget)
965970
main_layout = QVBoxLayout(main_widget)
966971

967972
# Status display

0 commit comments

Comments
 (0)