pyqt如何同时控制两个滚动条,同步拖动

def __init__(self):
    # 同时控制两个滚动条result_textEdit_en富文本框的name
    self.scrollbar1 = self.result_textEdit_en.verticalScrollBar()
    self.scrollbar2 = self.result_textEdit_cn.verticalScrollBar()

    self.scrollbar1.valueChanged.connect(self.scrolling1)
    self.scrollbar2.valueChanged.connect(self.scrolling2)

def scrolling1(self):
    self.scrollbar2.setValue(self.scrollbar1.value())

def scrolling2(self):
    self.scrollbar1.setValue(self.scrollbar2.value())

from : https://blog.csdn.net/hu22qi/article/details/121944715