Results 1 to 2 of 2

Thread: Use QPainter to draw on a videoStream

Threaded View

Previous Post Previous Post   Next Post Next Post
  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 10:19. Reason: missing [code] tags

Similar Threads

  1. Who can draw this Area with QPainter?
    By mehrdadsilver in forum Qt Programming
    Replies: 3
    Last Post: 14th July 2013, 07:35
  2. Qpainter draw line
    By waiter in forum Newbie
    Replies: 2
    Last Post: 26th April 2013, 09: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, 01:01
  4. how to draw points with qpainter?
    By athulms in forum Newbie
    Replies: 4
    Last Post: 23rd August 2011, 08:10
  5. Accessing videostream in Phonon
    By darksaga in forum Qt Programming
    Replies: 3
    Last Post: 4th June 2008, 12: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.