Results 1 to 5 of 5

Thread: Select pixel from image

Threaded View

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

    Default Re: Select pixel from image

    Your English is just fine, I have seen much worse here, believe me!
    I read that the QLabel class could not get a mouseClicked.
    Where did you read that?

    Do I have to use another class?
    In your code you are setting a QPixmap in your QLabel.
    The QPixmap is the object that is representing your Image.
    You can either:
    1. install an event filter on the QPixmap to extract the mouse position during a mousePressEvent()
    2. Subclass QPixmap and override the mousePressEvent().
    ==========================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.

  2. The following user says thank you to high_flyer for this useful post:

    sergio87 (26th April 2011)

Similar Threads

  1. Raw Pixel Data to Image or Picture, to draw in a Widget
    By augusbas in forum Qt Programming
    Replies: 1
    Last Post: 7th September 2010, 13:15
  2. Replies: 0
    Last Post: 7th May 2010, 22:45
  3. Select Region from image
    By yazwas in forum Newbie
    Replies: 4
    Last Post: 15th July 2009, 17:41
  4. How do i display the rgb value of a pixel
    By davidw in forum Qt Programming
    Replies: 2
    Last Post: 17th May 2009, 23:51
  5. QPixmap pixel by pixel ?
    By tommy in forum Qt Programming
    Replies: 19
    Last Post: 3rd December 2007, 22:52

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