How can I add a QPixmap in my Qt Quick interface?
I have just started to program in QML. Before I have only used QWidgets and other stuff like that. But now I want to use QML for my interface. Unfortunately there I have a bigger problem.
The program works this way that the user choose a folder in which images are stored. This images will be used as icons and to display one of them as a bigger picture. For that I search the images and create QPixmaps. Then I resize them and save those in my database because I don't want that the pc has to do that task all the time even if the user want to see the same images. Now I wanted to show those icons and images in my interface but I don't know how.
Do you have any idea how I can fix the problem?
You can have look at QQuickImageProvider class and related examples. This should help you pass the PixMap to QML.
At first I thought same. But this function only works with Strings which I don't want to use because they haven't have the information which the QPixmap have. I already changed the size of the QPixmaps and I want to use those.
What are the other parameters you have with Pixmap ? You can elaborate on what other things you would like to pass along with pixmap.
what do you mean by that?
I don't want to use because they haven't have the information which the QPixmap >have. I already changed the size of the QPixmaps and I want to use those.
Which information you are talking above w.r.t PixMap ?
There is not problem even if you change the size. What is the difficulty you have here ?