Resize image with mouse QTextEdit

  • Hello.

    i am working on a texteditor and it works fine actually. But i have a problem. I want to resize images for QTextEdit inside a dialog. And this dialog should show the image (which shall be resized) and some lines and rectangles like in Word 2013, when you click on the image, the resize corners comes up. Than you drag and drop with the mouse the size you want to give the image.
    And now my question: Is it possible in an not too difficult way ? Some tips or and little exmple would help me a lot!

    Thanks to all in advance. It would be cool, if the image shoudn't be saved on the disk and then inserted again. So resize it and the size of the image is changed after accepting the dialog with OK for example.


  • Lifetime Qt Champion


    There's an interesting thread on stack overflow for that question.

    Hope it helps

  • Thanks for your answer. That's the code I am using actually for resizing images. But I want to resize them with the mouse...

  • Hi .... as example from crop image , resize , apply filter on image is 9 years old code but its run...
    I have found a matrix for make this...


    to find:
    you can make a refactoring from code to load external image to...

  • I have adapted this code from qt4.8 to qt5.9.1 one mac el capitan but is not simple found all new qt5.9 object wath is chance ... but i say the installer is in file...
    all week is 20 download from 2007...

  • I have made a sample from a main.cpp & one header... 2 file
    Only color filter not run clean , crop , resize , rotate is ok...


  • Thanks.
    That's what I was searching for...

    But I have problems with Implementation. I don't know where and how to do that...

    Maybe someone can help me with this or can do that and explain what he did.

    Thanks in advance

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.