QGrahphicsScene/View Image Error.
-
On the Internet, right-click to copy an image, and then paste it in the GraphicsView.
Can I get the URL of the homepage where the image was saved from the image stored in the clipboard when I confirmed that the image is in the clipboard? Can I get it and create an image with it?
-
On the Internet, right-click to copy an image, and then paste it in the GraphicsView.
Can I get the URL of the homepage where the image was saved from the image stored in the clipboard when I confirmed that the image is in the clipboard? Can I get it and create an image with it?
@Pada_ Don't know about original URL, but you can get the image from clipboard using https://doc.qt.io/qt-5/qclipboard.html
-
@Pada_ Don't know about original URL, but you can get the image from clipboard using https://doc.qt.io/qt-5/qclipboard.html
Thank you for answer. First, it works fine until you get the image from the local to the clipboard and use it.
When I press the Copy image from Chrome button, it works fine.
https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png
I am looking for a way to put images using the URLs in these links.
-
Thank you for answer. First, it works fine until you get the image from the local to the clipboard and use it.
When I press the Copy image from Chrome button, it works fine.
https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png
I am looking for a way to put images using the URLs in these links.
@Pada_ said in QGrahphicsScene/View Image Error.:
I am looking for a way to put images using the URLs in these links.
Sorry, I don't understand. To put to where? Can you please explain better what exactly you want to do?
Do you want to download the picture from that URL? -
@Pada_ said in QGrahphicsScene/View Image Error.:
I am looking for a way to put images using the URLs in these links.
Sorry, I don't understand. To put to where? Can you please explain better what exactly you want to do?
Do you want to download the picture from that URL?Of course, QGraphicsPixmap exists as an item in QGraphicsView / Scene, but what we want is that when the user presses the right button of the mouse on the Internet to copy the image,
I want to get the URL with that image,
You want to show it in the scene with that URL.
The URL you posted earlier is the URL for the GOOGLE logo on the GOOGLE homepage.
I want to add a lot of comments quickly, but I can only write once every 10 minutes because I'm a beginner.
-
Of course, QGraphicsPixmap exists as an item in QGraphicsView / Scene, but what we want is that when the user presses the right button of the mouse on the Internet to copy the image,
I want to get the URL with that image,
You want to show it in the scene with that URL.
The URL you posted earlier is the URL for the GOOGLE logo on the GOOGLE homepage.
I want to add a lot of comments quickly, but I can only write once every 10 minutes because I'm a beginner.
@Pada_ You should check what https://doc.qt.io/qt-5/qclipboard.html#mimeData returns after you click Copy in the browser. I'm not sure the browser will put the URL as mime data into clipboard. If it does not then you can't do it like this.
-
@Pada_ You should check what https://doc.qt.io/qt-5/qclipboard.html#mimeData returns after you click Copy in the browser. I'm not sure the browser will put the URL as mime data into clipboard. If it does not then you can't do it like this.
-
If you click Copy image on the image, the contents of the clipboard will be stored in the Image, and the link (URL) with that image will not be saved. It is very difficult to create an image with that link.