Hi,
i have a qscrollarea and a qtablewidget on a form. In the qscrollarea there is a widget which is bigger than the form, so the scrollarea shows the scrollbars. What i want is, when i move the scrollbar of the tablewidget, that the scrollbar of the scrollare also moves synchronously.
I've tried this
connect(tablewidget->horizontalScrollBar(), SIGNAL(valueChanged(int)), scrollArea->horizontalScrollBar(), SLOT(setValue(int)));
connect(tablewidget->horizontalScrollBar(), SIGNAL(valueChanged(int)), scrollArea->horizontalScrollBar(), SLOT(setValue(int)));
To copy to clipboard, switch view to plain text mode
but the scrollarea bar moves only small steps while the tablewidget is already at the end. Is there another way to keep two scrollbars in sync?
Thank you.
//EDIT
Additionally i want the qscrollarea (i think it is the viewport) have always the same width as the tablewidget (viewport). How can i do this.
Bookmarks