Results 1 to 2 of 2

Thread: Use QPainter to draw on a videoStream

  1. #1
    Join Date
    Aug 2016
    Posts
    3
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default Use QPainter to draw on a videoStream

    I have a videoStream in a FrameLabel and i want to use QPainter to draw a rectangle on it, But when i do something like this:

    Qt Code:
    1. void CameraView::paintEvent(QPaintEvent * /*event*/)
    2. {
    3. QPainter painter(this);
    4. painter.setPen(Qt::blue);
    5. painter.drawRect(QRect( 500, 0, 150, 150));
    6. }
    To copy to clipboard, switch view to plain text mode 

    The rectangle is drawn behind the FrameLabel (i.e. behinde the videoStream)

    I would be very grateful if anyone can show me an easy way to go around this.
    Last edited by wysota; 9th September 2016 at 11:19. Reason: missing [code] tags

  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: Use QPainter to draw on a videoStream

    How is CameraView related to FrameLabel?
    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. Who can draw this Area with QPainter?
    By mehrdadsilver in forum Qt Programming
    Replies: 3
    Last Post: 14th July 2013, 08:35
  2. Qpainter draw line
    By waiter in forum Newbie
    Replies: 2
    Last Post: 26th April 2013, 10:17
  3. How does one draw a 'cut down' ellipse using QPainter
    By Eos Pengwern in forum Qt Programming
    Replies: 3
    Last Post: 24th July 2012, 02:01
  4. how to draw points with qpainter?
    By athulms in forum Newbie
    Replies: 4
    Last Post: 23rd August 2011, 09:10
  5. Accessing videostream in Phonon
    By darksaga in forum Qt Programming
    Replies: 3
    Last Post: 4th June 2008, 13:34

Tags for this Thread

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.