MainWindow
::MainWindow( QWidget * parent
){
// ... setupUI() , etc.
QScrollBar * listScroll1
= list1
->verticalScrollBar
();
QScrollBar * listScroll2
= list2
->verticalScrollBar
();
QScrollBar * listScroll3
= list3
->verticalScrollBar
();
connect( listScroll1, SIGNAL( valueChanged( int ) ), listScroll2, SLOT( setValue( int ) ) );
connect( listScroll1, SIGNAL( valueChanged( int ) ), listScroll3, SLOT( setValue( int ) ) );
connect( listScroll2, SIGNAL( valueChanged( int ) ), listScroll1, SLOT( setValue( int ) ) );
connect( listScroll2, SIGNAL( valueChanged( int ) ), listScroll3, SLOT( setValue( int ) ) );
connect( listScroll3, SIGNAL( valueChanged( int ) ), listScroll1, SLOT( setValue( int ) ) );
connect( listScroll3, SIGNAL( valueChanged( int ) ), listScroll2, SLOT( setValue( int ) ) );
}
MainWindow::MainWindow( QWidget * parent )
{
// ... setupUI() , etc.
QScrollBar * listScroll1 = list1->verticalScrollBar();
QScrollBar * listScroll2 = list2->verticalScrollBar();
QScrollBar * listScroll3 = list3->verticalScrollBar();
connect( listScroll1, SIGNAL( valueChanged( int ) ), listScroll2, SLOT( setValue( int ) ) );
connect( listScroll1, SIGNAL( valueChanged( int ) ), listScroll3, SLOT( setValue( int ) ) );
connect( listScroll2, SIGNAL( valueChanged( int ) ), listScroll1, SLOT( setValue( int ) ) );
connect( listScroll2, SIGNAL( valueChanged( int ) ), listScroll3, SLOT( setValue( int ) ) );
connect( listScroll3, SIGNAL( valueChanged( int ) ), listScroll1, SLOT( setValue( int ) ) );
connect( listScroll3, SIGNAL( valueChanged( int ) ), listScroll2, SLOT( setValue( int ) ) );
}
To copy to clipboard, switch view to plain text mode
Bookmarks