Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QGraphicsView.translate doesn't seem to do anything
QtWS25 Last Chance

QGraphicsView.translate doesn't seem to do anything

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 2.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sparkyb
    wrote on last edited by
    #1

    I'm trying to use QGraphicsView to display custom drawn graphs of some data where the X axis is time and the Y axis is a value. To start, I've subclassed QGraphicsView and implemented drawBackground to draw the grid lines. I've been able to call .scale() to zoom in and out and seen the grid lines adapt. When I try using .translate() to pan, the display doesn't change. Am I misunderstanding the way QGraphicsView works? Already I'm not sure how my desire to use dragging to pan an unbounded space mesh with QGraphicsView's idea that it is a viewport (with scrollbars I don't want) into a finite scene whose size is based on the position of the currently existing contents. Is there any good example of using QGraphicsView as a pan-able viewport into an unlimited space?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved