Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to pick the pixel color of bmp file using a mouse cursor's position?
Forum Updated to NodeBB v4.3 + New Features

How to pick the pixel color of bmp file using a mouse cursor's position?

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 942 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    romeo.rbw
    wrote on last edited by
    #1

    Hi...
    Is there any function in Qt to pick up the pixel color of our mouse cross cursor position? The image is from bmp file that was called by Qt.
    Thank you for any suggestion.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tucnak
      wrote on last edited by
      #2

      Heya

      If I were you I would use qt event system. Basically, you need to use event filter in parent widget or reimplement pixmap. Then, when you have relative x and y of click it's not an issue to find QColor on it's pixel

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved