Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. Failing to grok mappings of QGraphicsScene, QGraphicsView, etc.

Failing to grok mappings of QGraphicsScene, QGraphicsView, etc.

Scheduled Pinned Locked Moved Unsolved Language Bindings
qgraphicssceneqgraphicsviewmappingqpainteventpython
1 Posts 1 Posters 704 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.
  • U Offline
    U Offline
    ubuntourist
    wrote on 1 Nov 2016, 13:18 last edited by
    #1

    I have a UI that I designed with Qt-Designer. My code (Python / PySide) expands it to full screen via

       self.setWindowFlags(Qt.FramelessWindowHint)
       self.showFullScreen()
    

    So, I don't know the final dimensions of stuff before-hand. I have a QGroupBox that I want to have a QGraphicsItem centered in, and I want to be able to move the QGraphicsItem within the QGroupBox. I don't want to scroll off in any direction. I just want to center an SVG in a box and move it within the box.

    When I look at the explanation of how things map and QPaintEvents, I just go cross-eyed. Is there a straightforward way to just use the geometry of the QGroupBox after it has resized, as both the coordinate system and boundary / bounding box of my SVG image?

    If I have a background that is computationally drawn -- say for example a circle that fits inside the QGroupBox, is there a way to avoid redrawing it constantly as the SVG image moves around inside it?

    1 Reply Last reply
    0

    1/1

    1 Nov 2016, 13:18

    • Login

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