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. How to manipulate view in a QPainter?
Forum Updated to NodeBB v4.3 + New Features

How to manipulate view in a QPainter?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 484 Views 1 Watching
  • 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.
  • Celso NoronhaC Offline
    Celso NoronhaC Offline
    Celso Noronha
    wrote on last edited by
    #1

    Greetings to all!

    I have a QPainter on a Widget and would like to, at least, scroll it, but any mouse event manipulation at all would be nice. I've gloogle it a lot and no clue about.

    Many thanks in advance!

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      Hi
      You could put the widget inside a scrollarea?
      and make widget larger then area.
      Then u can scroll the area and what part / section of you widget that is visible.

      A painter is just a way to draw on screen so Im not sure what u mean by scrolling it.

      also " mouse event manipulation" ?
      You can get events via void YourWidget::mousePressEvent(QMouseEvent *event)
      there is also a move, and release.
      Its virtual functions so you will implement them in your subclass widget and
      get the event that way.

      1 Reply Last reply
      1

      • Login

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