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 and QGraphicsScene go Home area...
Qt 6.11 is out! See what's new in the release blog

QGraphicsView and QGraphicsScene go Home area...

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 588 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.
  • P Offline
    P Offline
    Pada_
    wrote on last edited by
    #1

    QGraphicsView and QGraphicsScene did not set the setScene and created QSize (800, 800) QGraphicsRectItem in QPoint (0,0) of Scene.

    I want to show the CenterPoint of the Scene's RectItem in the middle of the screen when I press the home key of the keyboard when the view shows an area, scrolls, or scale zoom (in, out).

    QGraphicsView's resetMatrix or translate shows a strange area. Is there a workaround?

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Moderators Qt Champions 2024 Qt Champions 2022 Qt Champions 2017
      wrote on last edited by
      #2

      translate is the right choice to change the drawing reference point. Also show the sample workable code to check on what is the strange behaviour & what you are expecting.

      Dheerendra
      @Community Service
      Certified Qt Specialist
      https://www.pthinks.com

      P 1 Reply Last reply
      0
      • dheerendraD dheerendra

        translate is the right choice to change the drawing reference point. Also show the sample workable code to check on what is the strange behaviour & what you are expecting.

        P Offline
        P Offline
        Pada_
        wrote on last edited by
        #3

        @dheerendra

        this translate exmple..

        0_1543370673148_9e0ee4b3-8066-4fbf-9997-7ac8f8fb7829-image.png

        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