Franz Fischlmair Franz Fischlmair - 4 months ago 48
Python Question

convert connect-statement from qt to pyqt5

how is the PyQt5 code of this Qt-connect-statement:

connect(frozenTableView->verticalScrollBar(), &QAbstractSlider::valueChanged,
verticalScrollBar(), &QAbstractSlider::setValue)


Thank you!

Franz

Answer

Something like this:

frozenTableView.verticalScrollBar().valueChanged.connect(
    self.verticalScrollBar().setValue)