Results 1 to 2 of 2

Thread: QGraphicsView draw grids and Graduation texts.

  1. #1
    Join Date
    Jul 2012
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows Symbian S60

    Lightbulb QGraphicsView draw grids and Graduation texts.

    hi all.

    I seek to draw grids and graduation indicators in a QGraphicsView.

    grids are horizontal and vertical lines
    graduations are text

    I have derived from QGraphicsView class and I overloaded the method DrawForeground. I use QPainter to draw lines and text.

    it works well, but the text illegible and are small scale and are convertible to each operation of zoom (scale (a, b​​)).

    * there is a solution to write a text with fixed size in QGraphicsView?

    thank to all .

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QGraphicsView draw grids and Graduation texts.

    Yes, you can invert the view transform or you can make your text pieces as items and then set ItemIgnoresTransformations on them.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Drawing grids efficiently in QGraphicsScene
    By Gopala Krishna in forum Qt Programming
    Replies: 16
    Last Post: 7th June 2012, 14:59
  2. Draw Line: QGraphicsView
    By vinaykusta in forum Qt Programming
    Replies: 5
    Last Post: 4th January 2012, 17:04
  3. QGraphicsView Draw Foreground
    By augusbas in forum Qt Programming
    Replies: 4
    Last Post: 22nd June 2011, 13:01
  4. Replies: 1
    Last Post: 9th April 2009, 14:54
  5. how to merge two adjacent grids of a QTableWidget into one?
    By bookmarkernj in forum Qt Programming
    Replies: 3
    Last Post: 7th July 2007, 17:20

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.