Thanks a lot, it works!
I post the solution for one scrollbar if others have the same problem:
_currentSliderValue = 0;
QScrollBar *lFctScrollBar
= _fctWidget
->verticalScrollBar
();
QScrollBar *lValueScrollBar
= _valFctWidget
->verticalScrollBar
();
connect(lFctScrollBar, &QAbstractSlider::valueChanged,
[=](int aSliderPosition){if(aSliderPosition != _currentSliderValue)
{
lValueScrollBar->setValue(aSliderPosition);
_currentSliderValue = aSliderPosition;
}
});
_currentSliderValue = 0;
QScrollBar *lFctScrollBar = _fctWidget->verticalScrollBar();
QScrollBar *lValueScrollBar = _valFctWidget->verticalScrollBar();
connect(lFctScrollBar, &QAbstractSlider::valueChanged,
[=](int aSliderPosition){if(aSliderPosition != _currentSliderValue)
{
lValueScrollBar->setValue(aSliderPosition);
_currentSliderValue = aSliderPosition;
}
});
To copy to clipboard, switch view to plain text mode
Do the same connect for the second.
Thanks d_stranz!
Bookmarks