Results 1 to 2 of 2

Thread: How to draw a coordinate system in a QGraphicsView

  1. #1
    Join Date
    Dec 2008
    Posts
    16
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default How to draw a coordinate system in a QGraphicsView

    Hey,
    I need to write a tool to make a scalable and movable plot of a route, basicly a point to point line. I figured QgraphicsView would be best for that purpose, cause u can easily scale and move the plot.
    My problem is: i want to draw a coordinate system into that plot. one x-axis on the bottom and a y-axis on the left. The problem is, i dont know how to draw sth on top of a QGraphicView which doesnt move when i change or scale the view. is there an option do create maybe a transparent widget on top of the graphic view?

    im getting really desperate on this..
    i hope someone can help me here

    greetings
    lutz

  2. #2
    Join Date
    Dec 2008
    Posts
    16
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to draw a coordinate system in a QGraphicsView

    ah, well and i tried that "QGraphicsView::drawForeground()" function, but apparently im too stupid to use it.. it doesnt draw anything, and in the descritpion it says it works with scene coordinates, not with the view coordinates.

Similar Threads

  1. Qt Coordinate System and the Graphics View Framework
    By djurodrljaca in forum Qt Programming
    Replies: 14
    Last Post: 17th February 2012, 11:19
  2. The coordinate system
    By avis_phoenix in forum Qt Programming
    Replies: 1
    Last Post: 28th July 2008, 12:16
  3. how to draw lines on image using QGraphicsView in Qt4
    By madhavilatha in forum What's New in Qt 4.4
    Replies: 1
    Last Post: 25th July 2008, 00:32
  4. Replies: 22
    Last Post: 7th December 2007, 09:01

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.