Results 1 to 9 of 9

Thread: DrawLine over QPixmap within Qlabel

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Wiki edits
    5

    Default Re: DrawLine over QPixmap within Qlabel

    Qt Code:
    1. QPixmap pix(":/your/fancy/png/here");
    2. QPainter p(&pix);
    3. p->drawLine(pix.rect().topLeft(),pix.rect().bottomRight());
    4. //use pix normaly...
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Wiki edits
    5

    Default Re: DrawLine over QPixmap within Qlabel

    Ok, I am out. spirit you get me one more time...

  3. #3
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanked 370 Times in 336 Posts

    Default Re: DrawLine over QPixmap within Qlabel

    Quote Originally Posted by Lykurg View Post
    Ok, I am out. spirit you get me one more time...
    sorry
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  4. #4
    Join Date
    Mar 2009
    Posts
    116
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    1

    Thumbs up Re: DrawLine over QPixmap within Qlabel

    Hey thanx both of you,

    Its working now !!!!!!!!!!

Similar Threads

  1. Rotate QPixmap set on QLabel
    By Qt Coder in forum Qt Programming
    Replies: 1
    Last Post: 18th March 2009, 12:08
  2. Replies: 2
    Last Post: 20th January 2009, 07:13
  3. Replies: 3
    Last Post: 17th July 2008, 07:43
  4. paintEvent, QString to QPixmap, QLabel
    By TheKedge in forum Qt Programming
    Replies: 1
    Last Post: 5th February 2007, 13:04
  5. QPixmap and HBITMAP
    By ToddAtWSU in forum Qt Programming
    Replies: 1
    Last Post: 21st June 2006, 16:24

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
  •  
Qt is a trademark of The Qt Company.