Results 1 to 2 of 2

Thread: How to apply a magnifier with this QGlwidget?

  1. #1
    Join Date
    May 2011
    Location
    North Carolina
    Posts
    23
    Thanks
    10
    Qt products
    Qt4

    Default How to apply a magnifier with this QGlwidget?

    I have read the code of Vector Deformation:


    This example magnifies the words in the widget using
    Qt Code:
    1. path.setElementPositionAt(i,
    2. x + flip * dx * len / m_radius,
    3. y + flip * dy * len / m_radius);
    To copy to clipboard, switch view to plain text mode 

    Right now, what I want to do is: magnify the whole content under the magnifer but not just the words:

    I have drawn the linkages and nodes using OpenGL in the QGLWidget:


    What I want to do is: magnify the linkages and nodes under the magnifier. However, this seems not as easy as the example Vector Deformation.

    So, I want to get some suggestions from you.

    Thanks a lot.

  2. #2
    Join Date
    Aug 2011
    Location
    Seoul, Korea
    Posts
    46
    Thanks
    9
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to apply a magnifier with this QGlwidget?

    Quote Originally Posted by superwave View Post
    I have read the code of Vector Deformation:


    This example magnifies the words in the widget using
    Qt Code:
    1. path.setElementPositionAt(i,
    2. x + flip * dx * len / m_radius,
    3. y + flip * dy * len / m_radius);
    To copy to clipboard, switch view to plain text mode 

    Right now, what I want to do is: magnify the whole content under the magnifer but not just the words:

    I have drawn the linkages and nodes using OpenGL in the QGLWidget:


    What I want to do is: magnify the linkages and nodes under the magnifier. However, this seems not as easy as the example Vector Deformation.

    So, I want to get some suggestions from you.

    Thanks a lot.
    This is really a OpenGL question so my answer is also using OpenGL =) You need to move your eye position around in order to magnify the scene. It means YOU are moving towards to the nodes then it will creates "magnifier" effect.

    Since you've drawn those nodes in OpenGL, I guess you know what I am talking about

    Regards,
    Dong Back Kim

Similar Threads

  1. How to apply font to QString
    By coolkaps in forum Newbie
    Replies: 1
    Last Post: 9th May 2010, 23:27
  2. How to apply a QStyle to a widget
    By Luc4 in forum Qt Programming
    Replies: 2
    Last Post: 14th March 2010, 18:55
  3. How to Apply stylesheet to QMessageBox?
    By sudhansu in forum Qt Programming
    Replies: 1
    Last Post: 7th January 2010, 08:32
  4. Apply different scale on items
    By lni in forum Qt Programming
    Replies: 1
    Last Post: 20th February 2009, 06:59
  5. how to apply qt css to qtopia application
    By namita in forum Qt Programming
    Replies: 1
    Last Post: 3rd March 2008, 12:19

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.