Results 1 to 3 of 3

Thread: Invalid pixmap

  1. #1
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Invalid pixmap

    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

    Qt Code:
    1. if(!pixmap()->isNull()){
    2. //Do some thing
    3. }
    To copy to clipboard, switch view to plain text mode 

    my application crashes

    Pls help

    Thanks a lot.

  2. #2
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    554
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Invalid pixmap

    Hint: Did you thought about pixmap() is maybe NULL?

  3. #3
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Invalid pixmap

    oh i never thought about it. Thanks, it works.

Similar Threads

  1. Qtopia cross-compile for arm
    By Bitz in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 12th June 2006, 12:11
  2. Paint XP radio button to pixmap
    By Ben.Hines in forum Qt Programming
    Replies: 2
    Last Post: 26th April 2006, 21:15
  3. Changing pixmap in PixmapLabel
    By bullerwj in forum Qt Tools
    Replies: 1
    Last Post: 11th April 2006, 22:28
  4. invalid use of undefined type
    By mikro in forum Newbie
    Replies: 2
    Last Post: 9th April 2006, 12:10
  5. How to paint a selection rectangle on a pixmap?
    By SkripT in forum Qt Programming
    Replies: 6
    Last Post: 8th January 2006, 19:52

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.