Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to save and load image in qt
If we share.doc file with anyone then also we can see the image so can I know how to save an image in qt so it can be used by anyone i.e. those who don't have the image inside the file
those who don't have the image inside the file
What file? Can you please explain better what you want to do?
Let think you are my friend and I want to send you a file of my own extension .hmt with the software and in that file, an image exists (The program open the image by its location) so if you open it then the image is not visible to you so can you tell me how can I assign an image in an object and then I save the object in a file and then read the object while writing the file...
Hope you understand
so can you tell me how can I assign an image in an object
I still don't understand what you mean. What object?
Are you talking about HTML file + images?
How does this "object" (whatever it is) access this image?
you have seen that whenever we send a .doc file in which some images are there so anyone can see that image if we send him the .doc file so how can I create so that if I also send my .hmt extension file to someone so he or she can see that image inside the file
.hmt extension file to someone so he or she can see that image inside the file
It depends on the format of that htm file.
What is this format? Is it your own format? Or something existing?
@UG-SEP Well, then you can decide how to include images. I have no idea how your format is defined. You did not even tell us whether it is text or binary format.
For example docx from Microsoft Word is a zip archive containing XML files and images (and what else is part of the document). The images are referenced in XML files then.
it's a text format
@UG-SEP Then you can simply put the image file next to htm file and send both together.
@UG-SEP An alternative would be to encode the image content as BASE64 and put this BASE64 string in your text file.
But I would not do this for bigger images.