Results 1 to 2 of 2

Thread: Qt 3.3.8 pixmap to/from image error

  1. #1
    Join Date
    Mar 2006
    Location
    Troy, Michigan, USA
    Posts
    17
    Thanks
    2
    Qt products
    Qt3
    Platforms
    MacOS X Unix/X11 Windows

    Default Qt 3.3.8 pixmap to/from image error

    I am trying to create a new icon set from an existing one by smooth scaling each of it’s pixmaps. When I try to do this, I get an assertion when I am trying to convert the image back to a pixmap just before setting the new pixmap in the iconset. I looked into it further and found that even a simple round-trip to and from an image is not working, and I receive the following assertions:

    Qt Code:
    1. ASSERT: "hBitmap" in kernel\qpixmap_win.cpp (117)
    2. ASSERT: "data->realAlphaBits" in kernel\qpixmap_win.cpp (118)
    To copy to clipboard, switch view to plain text mode 

    Here is some sample code that shows what I was trying to do:

    Qt Code:
    1. QIconSet *dest = new guiIconSet;
    2.  
    3. for ( int size = 0 ; size < 2 ; size++ )
    4. {
    5. for ( int mode = 0 ; mode < 3 ; mode++ )
    6. {
    7. for ( int state = 0 ; state < 2 ; state++ )
    8. {
    9. // Get the image from the source iconsets pixmap
    10. srcImg = pixmap((QIconSet::Size )size, (QIconSet::Mode )mode, (QIconSet::State )state);
    11.  
    12. if ( ! srcImg.isNull() )
    13. {
    14. guiPixmap destPm;
    15.  
    16. // Get the dest pixmap from the dest image
    17. destPm = srcImg;
    18.  
    19. if ( ! destPm.isNull() )
    20. dest->setPixmap(destPm, (QIconSet::Size )size, (QIconSet::Mode )mode, (QIconSet::State )state);
    21. }
    22. }
    23. }
    24. }
    To copy to clipboard, switch view to plain text mode 
    Thanks in advance.

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

    Default Re: Qt 3.3.8 pixmap to/from image error

    First 3.3.8 is very old. Second - the windows version is comercial only so you (hopefully) have a commercial license -> ask tt

Similar Threads

  1. QPSQL problem
    By LoneWolf in forum Installation and Deployment
    Replies: 60
    Last Post: 4th November 2009, 14:22
  2. QPSQL driver in windows
    By brevleq in forum Installation and Deployment
    Replies: 31
    Last Post: 14th December 2007, 12:57
  3. Error compiling psql plugin
    By vieraci in forum Installation and Deployment
    Replies: 4
    Last Post: 7th October 2007, 02:49
  4. qt 4.2.2 install on aix
    By try to remember in forum Installation and Deployment
    Replies: 2
    Last Post: 28th March 2007, 12:19
  5. use qpsql
    By raphaelf in forum Installation and Deployment
    Replies: 34
    Last Post: 22nd August 2006, 12: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.