Resize image with mouse QTextEdit
-
wrote on 25 Aug 2017, 16:43 last edited by A Former User
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.
Thanks
-
-
wrote on 26 Aug 2017, 06:29 last edited by
Thanks for your answer. That's the code I am using actually for resizing images. But I want to resize them with the mouse...
-
wrote on 26 Aug 2017, 07:17 last edited by
Hi .... as example from crop image , resize , apply filter on image is 9 years old code but its run...
https://github.com/pehohlva/xhtml_edit_qedit_base/blob/master/src/interface.cpp
I have found a matrix for make this...to find:
https://github.com/pehohlva/xhtml_edit_qedit_base
you can make a refactoring from code to load external image to... -
wrote on 26 Aug 2017, 08:22 last edited by
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 https://sourceforge.net/projects/wysiwyg-edit/ file...
all week is 20 download from 2007... -
wrote on 26 Aug 2017, 17:25 last edited by
I have made a sample from a main.cpp & one header... 2 file
Only color filter not run clean , crop , resize , rotate is ok...wget https://raw.githubusercontent.com/pehohlva/QOASIS/master/test/edit_q/main.cpp wget https://raw.githubusercontent.com/pehohlva/QOASIS/master/test/edit_q/interface.h wget https://raw.githubusercontent.com/pehohlva/QOASIS/master/test/edit_q/edit_q.pro
-
wrote on 3 Sept 2017, 15:48 last edited by
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
-
wrote on 4 Feb 2019, 11:19 last edited by
@HenrikSt
Hello, did you resolve the problem? -
@salwa
Hi
You do realize its via a dialog? no in place in the textEdit directly.