Hi,
Thank you Mr.Witold for the help. I connected them the way you adviced:
connect(ui->treeView->verticalScrollBar(),SIGNAL(valueChanged(int)),ui->graphicsView->verticalScrollBar(),SLOT(setValue(int)));
connect(ui->graphicsView->verticalScrollBar(),SIGNAL(valueChanged(int)),ui->treeView->verticalScrollBar(),SLOT(setValue(int)));
connect(ui->treeView->verticalScrollBar(),SIGNAL(valueChanged(int)),ui->graphicsView->verticalScrollBar(),SLOT(setValue(int)));
connect(ui->graphicsView->verticalScrollBar(),SIGNAL(valueChanged(int)),ui->treeView->verticalScrollBar(),SLOT(setValue(int)));
To copy to clipboard, switch view to plain text mode
I have such problem: on custom QGraphicsView I add QGraphicsScene and put to the screen multiple custom items such that I expect my QGraphicsView scolls to see all the items, but they does not. I set ScrollBarAlwaysOn. I see scrollbars, but they doesn't updated. The same set QTreeView does update on scroll, but QGraphicsView doesn't. Maybe to do something with viewport() ? How to call setWidgetResizable(true) on QGraphicsView?.See video example attached:
https://www.box.com/s/mhumghw4ad3nlj5ttl83
for example, in this video it is depicted how the QGraphicsView moves horizontally, but it doesn’t move vertically, disregards, that there are several items downmost.
https://www.box.com/s/o35b0p5pwyl5upn02z8z
What are the reasons ?
Bookmarks