Results 1 to 3 of 3

Thread: QImage::scaled() error in Qt4/e

  1. #1
    Join Date
    Apr 2006
    Posts
    2
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Question QImage::scaled() error in Qt4/e

    In Qt/e 4.0.0 b2 open source version, I employ QImage::scaled() to scale the image to the specified width and height, but the complier tell me this:
    no matching function for call to 'QImage::scaledToHeight(int &, Qt::TransformationMode)'

    When I use scaled() and other scaledToWidth(), it also give the error.

    whether this version Qt will not provide the image function?

  2. #2
    Join Date
    Jan 2006
    Posts
    105
    Thanks
    38
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QImage::scaled() error in Qt4/e

    Seems like the integer parameter that you're passing is not valid. Could it be because you are passing a reference to an int not strictly an int?
    From the docs:
    QImage scaledToHeight ( int height, Qt::TransformationMode mode = Qt::FastTransformation ) const
    look at the int parameter...


    Could you post some code to see where and how you call the function?
    Last edited by Dark_Tower; 6th April 2006 at 08:33.

  3. #3
    Join Date
    Apr 2006
    Posts
    2
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QImage::scaled() error in Qt4/e

    Yes, in this version, the QImage class declare as below:
    #ifndef QT_NO_IMAGE_TRANSFORMATION
    inline QImage scale( ........)
    QImage scale(const QSize,......)
    .........
    #endif

    this function is not here by default, and the embedded version include some macro for compiling, and some capbilities should be switch on by compiling macros.

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.