• 5825阅读
  • 4回复

[讨论]Qtabview垂直滚动条怎么置底 [复制链接]

上一主题 下一主题
离线zheguzai
 

只看楼主 倒序阅读 楼主  发表于: 2012-10-23
怎么让Qtabview的垂直滚动条置底,默认滚动调试在最上面的,现在从串口读取数据后往tabview中添加,最新添加的数据在最后没,想把垂直滚动条置底,这样就可以看见每次最新的数据。。。。
离线alexltr

只看该作者 1楼 发表于: 2012-10-23


scrollToBottom () ??

我不从事IT,只是喜欢Qt。
我不是程序员,只是与程序有缘。
我写程序,只是为了让工作变得简单有序!

                      ----  一个一直在入门的编程学习者
离线hehuim

只看该作者 2楼 发表于: 2012-10-23
void QTableWidget::scrollToItem ( const QTableWidgetItem * item, QAbstractItemView::ScrollHint hint = EnsureVisible )????
离线ggkuroky
只看该作者 3楼 发表于: 2012-10-23
QTableWidget *ptablewidget = new QTableWidget;
ptablewidget ->verticalScrollBar()->setValue(0);
value : int
This property holds the slider's current value.
The slider forces the value to be within the legal range: minimum <= value <= maximum.
Changing the value also changes the sliderPosition.

sliderPosition : int
This property holds the current slider position.
If tracking is enabled (the default), this is identical to value.
Access functions:
int    sliderPosition () const
void    setSliderPosition ( int )

大哥,是QTableWidget 不是QTabWidget,
相信自己,天道酬勤!
离线ggkuroky
只看该作者 4楼 发表于: 2012-10-23
是QTableView,不是QTableWidget和QTabView
相信自己,天道酬勤!
快速回复
限100 字节
 
上一个 下一个