Results 1 to 3 of 3

Thread: Widget window Id passed and need to draw circles on it (opaque)

  1. #1
    Join Date
    Jun 2009
    Location
    India
    Posts
    143
    Thanks
    16
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Widget window Id passed and need to draw circles on it (opaque)

    Hi all,

    I am passing a widget window id ( Label ) to a 3rd party library and it puts the graphics into it...

    Now i need to draw some circles on the same widget , and it should be always on top of the graphics drawn from 3rd party i.e fully opaque ..

    Any ideas would be helpful ..

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,716
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Widget window Id passed and need to draw circles on it (opaque)

    To make sure its on top of the drawing done by the other lib, you have to make sure you are drawing the circle after the lib has finished drawing.
    Do you have any means of knowing if and when the other lib has finished drawing?
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Jun 2011
    Location
    Finland
    Posts
    164
    Thanks
    1
    Thanked 26 Times in 26 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Maemo/MeeGo

    Default Re: Widget window Id passed and need to draw circles on it (opaque)

    If this 3rd party library draws the image not into a QLabel, but on top of the window with winId, then it is quite problematic. Check if that picture come as a top-level window, if it stays always on top. Try to move some other window on top of that image and see if there aren't any artifacts in displaying the picture. If you are able to move another window on top of that picture, then just create a top-level window with correct attributes, so its transparent and draw your circles in it.

Similar Threads

  1. Replies: 1
    Last Post: 2nd May 2011, 11:12
  2. Replies: 4
    Last Post: 21st February 2011, 15:28
  3. Replies: 3
    Last Post: 17th March 2008, 20:54
  4. Draw contents of widget in another widget
    By gustavosbarreto in forum Qt Programming
    Replies: 1
    Last Post: 6th August 2007, 15:43
  5. Replies: 5
    Last Post: 7th November 2006, 16: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.