There is no one function call you can make to do it. You need to apply an algorithm for detecting areas of similar color. Not much Qt can help you with here, the algorithm will be the same regardless of the technology you use.