Results 1 to 2 of 2

Thread: QGLWidget Render Text in the foreground

  1. #1
    Join Date
    Apr 2008
    Posts
    35
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default QGLWidget Render Text in the foreground

    Hi,

    I have a QGLWidget which displays Webcam video, i want to be able to display the text in the right corner with the name and some information with it. I tried using renderText(...) but it doesnot display anything or maybe it displays but is behind the video.. as there is constant change in the scene rendering the text may be over written...

    is there anyway i can add like a layer over the scene and display the text?

    Thanks

  2. #2
    Join Date
    Feb 2007
    Location
    Karlsruhe, Germany
    Posts
    469
    Thanks
    17
    Thanked 90 Times in 88 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QGLWidget Render Text in the foreground

    Hi there!

    How do you paint the webcam video? As a low-level dynamic opengl-texture or as some QGraphicsItem with a custom paint? Show us some code!

    Either way, all you have to do is provide opengl a correct depth/z-value for both your video and the text.

    How to do that with a QGraphicsScene (draw the video in its background), you might want to look at qt's boxes demo.

    Johannes

Similar Threads

  1. Setting QGraphicsView bacground/foreground color
    By zolookas in forum Qt Tools
    Replies: 1
    Last Post: 28th June 2008, 17:55
  2. How to keep window in foreground
    By szicsi in forum Qt Programming
    Replies: 5
    Last Post: 17th January 2008, 15:40
  3. Painting: How to control what's in the foreground?
    By Mister_Crac in forum Qt Programming
    Replies: 16
    Last Post: 8th May 2007, 14:00
  4. Qwt 5 - render TeX text
    By ak in forum Qwt
    Replies: 2
    Last Post: 1st May 2007, 10:08
  5. Updating Foreground for QGraphicsView
    By tts80 in forum Qt Programming
    Replies: 5
    Last Post: 4th January 2007, 16:28

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.