I also needed to place a scroll bar on the left side of a tableView, and based on the layout advice from jpn, i did is the fallowing:
reportTableView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
QScrollBar* scrollBar
= reportTableView
->verticalScrollBar
();
// Add widgets to H layout.
layout->addWidget(scrollBar);
layout->addWidget(reportTableView );
QTableView* reportTableView = new QTableView(this);
reportTableView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
QScrollBar* scrollBar = reportTableView->verticalScrollBar();
// Add widgets to H layout.
layout->addWidget(scrollBar);
layout->addWidget(reportTableView );
To copy to clipboard, switch view to plain text mode
This way you use the existing scrollBar, but place it on the left.
Hope this works right.
Bookmarks