Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved QGrahphicsScene/View Image Error.

    General and Desktop
    2
    8
    452
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      Pada_ last edited by

      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?

      jsulm 1 Reply Last reply Reply Quote 0
      • jsulm
        jsulm Lifetime Qt Champion @Pada_ last edited by

        @Pada_ Don't know about original URL, but you can get the image from clipboard using https://doc.qt.io/qt-5/qclipboard.html

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        P 1 Reply Last reply Reply Quote 0
        • P
          Pada_ @jsulm last edited by

          @jsulm

          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.

          jsulm 1 Reply Last reply Reply Quote 0
          • jsulm
            jsulm Lifetime Qt Champion @Pada_ last edited by

            @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?

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            P 1 Reply Last reply Reply Quote 0
            • P
              Pada_ @jsulm last edited by

              @jsulm

              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.

              jsulm 1 Reply Last reply Reply Quote 0
              • jsulm
                jsulm Lifetime Qt Champion @Pada_ last edited by jsulm

                @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.

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                P 1 Reply Last reply Reply Quote 0
                • P
                  Pada_ @jsulm last edited by

                  @jsulm

                  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.

                  jsulm 1 Reply Last reply Reply Quote 0
                  • jsulm
                    jsulm Lifetime Qt Champion @Pada_ last edited by

                    @Pada_ Well, if the link is not copied together with the image into clipboard then you can't do it this way. You only get the image then...

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post