<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[QLabel + QImage Error.]]></title><description><![CDATA[<p dir="auto">Copy and paste the picture into QGraphicsView to create an RGB representation. What is the problem?</p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/77776233-68cf-473c-94fc-23db8cabfc25.png" alt="0_1554685838343_b4525170-0554-4a49-bd80-c29e1e7e9967-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.qt.io/topic/101531/qlabel-qimage-error</link><generator>RSS for Node</generator><lastBuildDate>Tue, 12 May 2026 21:25:56 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/101531.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 08 Apr 2019 01:10:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QLabel + QImage Error. on Tue, 09 Apr 2019 04:54:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/pada_">@<bdi>Pada_</bdi></a><br />
nope. i dont have 5.4.</p>
]]></description><link>https://forum.qt.io/post/521970</link><guid isPermaLink="true">https://forum.qt.io/post/521970</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Tue, 09 Apr 2019 04:54:28 GMT</pubDate></item><item><title><![CDATA[Reply to QLabel + QImage Error. on Mon, 08 Apr 2019 23:28:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mrjj">@<bdi>mrjj</bdi></a></p>
<p dir="auto">5.4 or later Qt can not be installed and used for convenience.</p>
<p dir="auto">Have you tried mrjj in 5.4?</p>
]]></description><link>https://forum.qt.io/post/521959</link><guid isPermaLink="true">https://forum.qt.io/post/521959</guid><dc:creator><![CDATA[Pada_]]></dc:creator><pubDate>Mon, 08 Apr 2019 23:28:52 GMT</pubDate></item><item><title><![CDATA[Reply to QLabel + QImage Error. on Mon, 08 Apr 2019 09:43:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/pada_">@<bdi>Pada_</bdi></a><br />
Are you saying the code you show here and QLablel works but<br />
in real program it don't with QGraphicsView ?</p>
<p dir="auto">Would it be possible to test with a newer Qt version ?<br />
5.4 is pretty old.</p>
]]></description><link>https://forum.qt.io/post/521842</link><guid isPermaLink="true">https://forum.qt.io/post/521842</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Mon, 08 Apr 2019 09:43:37 GMT</pubDate></item><item><title><![CDATA[Reply to QLabel + QImage Error. on Mon, 08 Apr 2019 09:31:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mrjj">@<bdi>mrjj</bdi></a></p>
<p dir="auto">I also tested it with the source I wrote.</p>
<p dir="auto">But it looks like a picture. I do not know where the problem is.</p>
]]></description><link>https://forum.qt.io/post/521840</link><guid isPermaLink="true">https://forum.qt.io/post/521840</guid><dc:creator><![CDATA[Pada_]]></dc:creator><pubDate>Mon, 08 Apr 2019 09:31:10 GMT</pubDate></item><item><title><![CDATA[Reply to QLabel + QImage Error. on Mon, 08 Apr 2019 09:21:58 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/pada_">@<bdi>Pada_</bdi></a><br />
Which source ?<br />
I used your QClipboard *clipboard = QApplication::clipboard(); code and a blank project with QLabel.</p>
]]></description><link>https://forum.qt.io/post/521837</link><guid isPermaLink="true">https://forum.qt.io/post/521837</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Mon, 08 Apr 2019 09:21:58 GMT</pubDate></item><item><title><![CDATA[Reply to QLabel + QImage Error. on Mon, 08 Apr 2019 09:19:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mrjj">@<bdi>mrjj</bdi></a></p>
<p dir="auto">I am using Qt5.4 version and Windows8 64Bit.</p>
<p dir="auto">The same phenomenon came out on Windows10 64Bit.</p>
<p dir="auto">I did it with the same source, but did not come out with RGB dots like the picture?</p>
<p dir="auto">Can I check the source?</p>
]]></description><link>https://forum.qt.io/post/521836</link><guid isPermaLink="true">https://forum.qt.io/post/521836</guid><dc:creator><![CDATA[Pada_]]></dc:creator><pubDate>Mon, 08 Apr 2019 09:19:55 GMT</pubDate></item><item><title><![CDATA[Reply to QLabel + QImage Error. on Mon, 08 Apr 2019 09:08:56 GMT]]></title><description><![CDATA[<p dir="auto">Hi<br />
Using your code and paste to QLabel did not show RGB dots<br />
<img src="http://imagizer.imageshack.com/img924/8629/qMs7AS.png" alt="alt text" class=" img-fluid img-markdown" /></p>
<p dir="auto">What Qt version are you using ?</p>
]]></description><link>https://forum.qt.io/post/521833</link><guid isPermaLink="true">https://forum.qt.io/post/521833</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Mon, 08 Apr 2019 09:08:56 GMT</pubDate></item><item><title><![CDATA[Reply to QLabel + QImage Error. on Mon, 08 Apr 2019 08:37:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mrjj">@<bdi>mrjj</bdi></a></p>
<p dir="auto">QGraphicsView I'm working on it, so you can do it with Ctrl + V.</p>
<p dir="auto">In addition to QGraphicsView, the result is the same even if you create a new project and set the Image stored in the Clipboard in the QLabel.</p>
<ol>
<li>
<p dir="auto">Capture the image with the capture tool and do not save it. Then click the right mouse button and click Copy. It will then enter the Clipboard.</p>
</li>
<li>
<p dir="auto">Run it as my source.</p>
</li>
<li>
<p dir="auto">Looking at the left corner or the corners of the image, you will see the RGB dots.</p>
<p dir="auto">QClipboard *clipboard = QApplication::clipboard();<br />
if(!clipboard)<br />
return;</p>
</li>
</ol>
<p dir="auto">test source !</p>
<p dir="auto">#include "mainwindow.h"<br />
#include "ui_mainwindow.h"</p>
<p dir="auto">#include &lt;QBuffer&gt;<br />
#include &lt;QClipboard&gt;<br />
#include &lt;QMimeData&gt;</p>
<p dir="auto">MainWindow::MainWindow(QWidget *parent) :<br />
QMainWindow(parent),<br />
ui(new Ui::MainWindow)<br />
{<br />
ui-&gt;setupUi(this);</p>
<pre><code>QClipboard *clipboard = QApplication::clipboard();
if(!clipboard)
    return;

const QMimeData *mimeData = clipboard-&gt;mimeData();
if(!mimeData)
    return;

if(mimeData-&gt;hasImage())
{
    QImage image = qvariant_cast&lt;QImage&gt; (mimeData-&gt;imageData());
    ui-&gt;label-&gt;setPixmap(QPixmap::fromImage(image));
}
</code></pre>
<p dir="auto">}</p>
<p dir="auto">MainWindow::~MainWindow()<br />
{<br />
delete ui;<br />
}</p>
]]></description><link>https://forum.qt.io/post/521827</link><guid isPermaLink="true">https://forum.qt.io/post/521827</guid><dc:creator><![CDATA[Pada_]]></dc:creator><pubDate>Mon, 08 Apr 2019 08:37:54 GMT</pubDate></item><item><title><![CDATA[Reply to QLabel + QImage Error. on Mon, 08 Apr 2019 08:23:44 GMT]]></title><description><![CDATA[<p dir="auto">Ok.<br />
But i cant get to it to paste anything to a QGraphicsView .<br />
Nothing happens.<br />
Did you write some code to allow this ?</p>
]]></description><link>https://forum.qt.io/post/521822</link><guid isPermaLink="true">https://forum.qt.io/post/521822</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Mon, 08 Apr 2019 08:23:44 GMT</pubDate></item><item><title><![CDATA[Reply to QLabel + QImage Error. on Mon, 08 Apr 2019 08:18:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mrjj">@<bdi>mrjj</bdi></a></p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/7f53fc3d-178b-4f7a-a271-926c95358717.png" alt="0_1554711475143_4014497_en_1.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">use this tool.</p>
]]></description><link>https://forum.qt.io/post/521820</link><guid isPermaLink="true">https://forum.qt.io/post/521820</guid><dc:creator><![CDATA[Pada_]]></dc:creator><pubDate>Mon, 08 Apr 2019 08:18:14 GMT</pubDate></item><item><title><![CDATA[Reply to QLabel + QImage Error. on Mon, 08 Apr 2019 08:02:17 GMT]]></title><description><![CDATA[<p dir="auto">Hi<br />
Im not sure what tool that is. ?<br />
Seems not to be installed in my windows.</p>
]]></description><link>https://forum.qt.io/post/521815</link><guid isPermaLink="true">https://forum.qt.io/post/521815</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Mon, 08 Apr 2019 08:02:17 GMT</pubDate></item><item><title><![CDATA[Reply to QLabel + QImage Error. on Mon, 08 Apr 2019 05:45:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a></p>
<p dir="auto">QGraphicsScene, as I said before.</p>
<p dir="auto">There is an item in the sceneItem that deals with the image, but it is not the same as me.</p>
<p dir="auto">I did not put it anywhere. Just the label of the new projet and the way I told you before, there's an RGB mark in the corner.</p>
]]></description><link>https://forum.qt.io/post/521789</link><guid isPermaLink="true">https://forum.qt.io/post/521789</guid><dc:creator><![CDATA[Pada_]]></dc:creator><pubDate>Mon, 08 Apr 2019 05:45:04 GMT</pubDate></item><item><title><![CDATA[Reply to QLabel + QImage Error. on Mon, 08 Apr 2019 05:40:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/pada_">@<bdi>Pada_</bdi></a> said in <a href="/post/521786">QLabel + QImage Error.</a>:</p>
<blockquote>
<p dir="auto">I'm importing QImgae from the clipboard and converting it to Pixmapd.</p>
</blockquote>
<p dir="auto">How?</p>
<p dir="auto">"However, if you save the image to the clipboard without a path and paste it, it is created without the path." - paste where?<br />
I really don't understand what you're doing. Where exactly do you do Ctrl-v?</p>
]]></description><link>https://forum.qt.io/post/521788</link><guid isPermaLink="true">https://forum.qt.io/post/521788</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Mon, 08 Apr 2019 05:40:59 GMT</pubDate></item><item><title><![CDATA[Reply to QLabel + QImage Error. on Mon, 08 Apr 2019 05:35:47 GMT]]></title><description><![CDATA[<p dir="auto">It is set to QLabel-&gt; setPixMap.</p>
<p dir="auto">I'm importing QImgae from the clipboard and converting it to Pixmapd.</p>
<p dir="auto">No, I already did it because I could do it by setting the image on the path and setting it.</p>
<p dir="auto">However, if you save the image to the clipboard without a path and paste it, it is created without the path.</p>
<p dir="auto">This is also created by setting the image on the label. But as I said, there is an RGB Sign in the corner. That may explain why it occurs and how to get rid of it. I'm asking that.</p>
]]></description><link>https://forum.qt.io/post/521786</link><guid isPermaLink="true">https://forum.qt.io/post/521786</guid><dc:creator><![CDATA[Pada_]]></dc:creator><pubDate>Mon, 08 Apr 2019 05:35:47 GMT</pubDate></item><item><title><![CDATA[Reply to QLabel + QImage Error. on Mon, 08 Apr 2019 05:29:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/pada_">@<bdi>Pada_</bdi></a> I don't see how you can set image on a QLabel via copy/paste? You need to select a resource or image file.<br />
So, how exactly do you do this "Set the image on the label"?</p>
]]></description><link>https://forum.qt.io/post/521784</link><guid isPermaLink="true">https://forum.qt.io/post/521784</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Mon, 08 Apr 2019 05:29:49 GMT</pubDate></item><item><title><![CDATA[Reply to QLabel + QImage Error. on Mon, 08 Apr 2019 05:19:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a></p>
<p dir="auto">I want to create an image in QGraphicsView in QGraphicsScene with the Ctrl + V image copied from the clipboard.</p>
<p dir="auto">The capture tool is a tool provided by Windows.</p>
<p dir="auto">It is created in the corner like a photograph.</p>
<ol>
<li>
<p dir="auto">Run the capture tool provided by Windows.</p>
</li>
<li>
<p dir="auto">Do not save to the path, right-click, and then click Copy.<br />
<img src="https://ddgobkiprc33d.cloudfront.net/6d6f3db2-eeac-47a7-a4e5-bb14ad94e552.png" alt="0_1554700675995_7c6c64bf-8d52-408f-8ff4-2ebef7dc9cf4-image.png" class=" img-fluid img-markdown" /></p>
</li>
<li>
<p dir="auto">Set the image on the label. There is an RGB display in the lower left corner.<br />
<img src="https://ddgobkiprc33d.cloudfront.net/ba14698e-613a-45e3-a6b8-09517880610c.png" alt="0_1554700754487_0b842b10-d800-4287-b9cf-d15bc6e93430-image.png" class=" img-fluid img-markdown" /></p>
</li>
</ol>
]]></description><link>https://forum.qt.io/post/521779</link><guid isPermaLink="true">https://forum.qt.io/post/521779</guid><dc:creator><![CDATA[Pada_]]></dc:creator><pubDate>Mon, 08 Apr 2019 05:19:20 GMT</pubDate></item><item><title><![CDATA[Reply to QLabel + QImage Error. on Mon, 08 Apr 2019 04:58:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/pada_">@<bdi>Pada_</bdi></a> said in <a href="/post/521777">QLabel + QImage Error.</a>:</p>
<blockquote>
<p dir="auto">capture tool</p>
</blockquote>
<p dir="auto">what is this?<br />
Ctrl-C/Ctrl-V where?</p>
]]></description><link>https://forum.qt.io/post/521778</link><guid isPermaLink="true">https://forum.qt.io/post/521778</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Mon, 08 Apr 2019 04:58:25 GMT</pubDate></item><item><title><![CDATA[Reply to QLabel + QImage Error. on Mon, 08 Apr 2019 04:52:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a><br />
This does not happen on Linux, only on Windows. Use the capture tool. After capturing, ctrl + C / ctrl + V will create a RGB Sign like the picture in the lower left corner. Is there a way to get rid of it?</p>
]]></description><link>https://forum.qt.io/post/521777</link><guid isPermaLink="true">https://forum.qt.io/post/521777</guid><dc:creator><![CDATA[Pada_]]></dc:creator><pubDate>Mon, 08 Apr 2019 04:52:11 GMT</pubDate></item><item><title><![CDATA[Reply to QLabel + QImage Error. on Mon, 08 Apr 2019 04:39:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/pada_">@<bdi>Pada_</bdi></a> Can you please rephrase your question? I really don't understand what you're asking...</p>
]]></description><link>https://forum.qt.io/post/521776</link><guid isPermaLink="true">https://forum.qt.io/post/521776</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Mon, 08 Apr 2019 04:39:03 GMT</pubDate></item></channel></rss>