Programmatic QGraphicsView scrolling not updating properly

后端 未结 3 567
北海茫月
北海茫月 2021-01-12 19:20

I have a custom class derived from QGraphicsView that implements a slot call scrollHorizontal(int dx), inside the code is simply

void CustomView::scrollHoriz         


        
3条回答
  •  太阳男子
    2021-01-12 19:43

    You are not supposed to call scrollContentsBy as explained here: http://qt-project.org/doc/qt-4.8/qabstractscrollarea.html#scrollContentsBy

    I don't know if you can still call the hidden scrollbar to scroll it. If not, translate is an option.

提交回复
热议问题