wip: ScoreEditor

This commit is contained in:
2023-09-01 06:45:12 +08:00
parent af178744b8
commit 565260d6ce
5 changed files with 741 additions and 274 deletions

View File

@ -15,6 +15,7 @@ from PySide6.QtWidgets import (
from ui.implements.components.chartSelector import ChartSelector
from ..utils import keepWidgetInScreen
from .base import TextSegmentDelegate
@ -164,6 +165,8 @@ class ChartDelegate(TextSegmentDelegate):
def updateEditorGeometry(self, editor: QWidget, option, index: QModelIndex) -> None:
editor.move(editor.pos() + option.rect.topLeft())
editor.setMaximumWidth(option.rect.width())
keepWidgetInScreen(editor)
def setEditorData(self, editor: ChartSelectorDelegateWrapper, index: QModelIndex):
if self.checkIsEditor(editor) and isinstance(self.getChart(index), Chart):