Results 1 to 5 of 5

Thread: QGraphicsView and QTreeView synchronous scrolling

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Join Date
    Jul 2010
    Posts
    72
    Qt products
    Qt4 Qt/Embedded Qt Jambi
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanked 3 Times in 3 Posts

    Default Re: QGraphicsView and QTreeView synchronous scrolling

    Hi,
    Thank you Mr.Witold for the help. I connected them the way you adviced:
    Qt Code:
    1. connect(ui->treeView->verticalScrollBar(),SIGNAL(valueChanged(int)),ui->graphicsView->verticalScrollBar(),SLOT(setValue(int)));
    2. 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 ?
    Last edited by freely; 16th January 2013 at 14:29.

  2. The following user says thank you to freely for this useful post:


Similar Threads

  1. QGraphicsView and Scrolling
    By validator in forum Qt Programming
    Replies: 5
    Last Post: 8th September 2017, 00:27
  2. QTreeView problem scrolling to end.
    By seneca in forum Qt Programming
    Replies: 7
    Last Post: 22nd December 2015, 12:08
  3. Replies: 3
    Last Post: 25th May 2010, 10:29
  4. Custom scrolling of QGraphicsView
    By hb in forum Qt Programming
    Replies: 0
    Last Post: 12th August 2008, 10:10
  5. QGraphicsView scrolling problem with 4.3.0
    By hb in forum Qt Programming
    Replies: 8
    Last Post: 30th August 2007, 22:18

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.