Drawing image with 3'rd party library.

  • Hi all!

    I have a question about using Qt with Open eVision library.

    Open eVision is the image processing library form Euresys.
    site: www.euresys.com

    This library provides the EImageBW8 object for 8bit mono image.

    And, this object can draw the image using Draw() API.

    Draw() API is as below:
    void Draw(
    HDC graphicContext,

    In MFC, I can draw the image to Picture control using HDC from Picture control.

    But I don't know about how to do that in Qt.
    Qt is the same as MFC?
    In Qt, what kind of controls use to drawing image?
    (I want to use EImageBW8 object, not QImage.)

    Please give me an advice.

    Thank you :)

  • Lifetime Qt Champion


    No Qt is not like MFC.

    Do you mean you would like to do the drawing with your 3rd party library and then show the result in your Qt application ?

  • @sgaist
    Hi. I'm so sorry to reply late.
    Yes, right.

    I would like to do the drawing with 3'rd party library.
    This library needs HDC from the target.

    I have tested that convert from 3'rd party library to QImage, and I could draw the image on QLabel.
    But I don't know how to draw directly on QLabel by using the 3'rd party library.

  • Lifetime Qt Champion

    I think that rendering to a QImage first is the right thing to do.

    If you need to update it regularly, you might want to make your own QWidget subclass and in the paint event use your third party library to render to a QImage and then paint that on your widget.

    The QtWinExtras module might give you some more tools for that.

  • Thank you for your reply :)
    so, you mean...

    1. 3rd party library to QImage.
    2. create subclass from QWidget.

    I will try it. Thank you for your advise!

  • @LuckyGg
    Hi,I have a question.
    How to use Open eVision library in Qt?
    Please give me an advice.
    Thank you.

Log in to reply