Results 1 to 2 of 2

Thread: QGLWidget with text - zoom in / zoom out

  1. #1
    Join Date
    Aug 2008
    Posts
    60
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QGLWidget with text - zoom in / zoom out

    Hi,

    I need the zoom in/out facility in QGLWidget, which has text drawn on it with other primitives.

    When I zoom in/out the primitives get minimized/maximized but the text remains at the same size. I want to have text size should reduce/increate with zoom in/out.

    Thank you.

  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: QGLWidget with text - zoom in / zoom out

    This question is strictly related to OpenGL itself and not to Qt... If you draw text using OpenGL, use OpenGL means to scale it. If you use Qt to draw text over an OpenGL scene then the text is independent of the scene and its scale, so you have to recalculate its new size and position manually.

Similar Threads

  1. Unhandled exception in qatomic
    By NewGuy in forum Qt Programming
    Replies: 14
    Last Post: 23rd July 2013, 09:49

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.