PDA

View Full Version : Invalid pixmap



munna
8th June 2006, 07:26
I want to find if a label has a pixmap or not.

Qt Docs says :

If no pixmap has been set this will return an invalid pixmap.

But how can you find if a pixmap is valid or not?

When I try to use




if(!pixmap()->isNull()){
//Do some thing
}



my application crashes

Pls help

Thanks a lot.

ChristianEhrlicher
8th June 2006, 07:49
Hint: Did you thought about pixmap() is maybe NULL?

munna
8th June 2006, 08:00
oh i never thought about it. Thanks, it works.