PDA

View Full Version : How to disable vertical scroll bar in QTableWidget



grsandeep85
14th October 2009, 11:33
Hi All,

I am using QTableWidget i have set 200 rows and 4 columns now i need to disable the vertical scroll bar how to proceed with this. Any snippet will be advantage.

spirit
14th October 2009, 11:53
if you need to disable then use something like this:


QTableWidget *table = new QTableWidget(this);
....
table->verticalScrollBar()->setDisabled(true);
....

if you need to hide it then use something like this:


QTableWidget *table = new QTableWidget(this);
....
table->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff) ;
....

grsandeep85
14th October 2009, 12:07
Thanks its working fine.