<?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[QPdfView, QSerial port, Gstreamer issues]]></title><description><![CDATA[<p dir="auto">Hello.<br />
I have been learning QT for a while and I have encountered few problems that I didn't manage to solve on my own. First is QPdfView header is no where to be found QTMaintainence tool shows that I have installed Qt Pdf library, I also have tried to reinstall it and search in QT folder with no success (QT version 6.5.2).  Second problem is that when I create virtual com port pair, succesfully open one of the ports (according to QSerialPort::open) and write data to it I still don't get anything on the other end (Virtual serial port Driver indicates that the port was never opened). Third problem is that I'm not sure how to use gstreamer I belive code like that:</p>
<pre><code>int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    MainWindow w;
    QMediaPlayer * player;
    player = new QMediaPlayer;
    player-&gt;setSource(QUrl("gst-pipeline: videotestsrc ! autovideosink"));
    //player-&gt;setSource(QUrl("C://Users//username//Downloads//1.mp4"));
    QVideoWidget *vid;
    vid = new QVideoWidget;
    player-&gt;setVideoOutput(vid);
    std::cout&lt;&lt;player-&gt;isPlaying()&lt;&lt;std::endl;
    vid-&gt;show();
    player-&gt;play();
    return a.exec();
}
</code></pre>
<p dir="auto">should display same thing as gst-launch-1.0.exe videotestsrc ! autovideosink however all I can see in QT app is a black screen (I have also tried qtvideosink). I have installed GStreamer MSVC 64-bit (VS 2019, Release CRT) (runtime and devel) from thier website. Do I need to do some configuration to make it work? (gst-launch-1.0.exe videotestsrc ! autovideosink works fine from CMD)</p>
]]></description><link>https://forum.qt.io/topic/149243/qpdfview-qserial-port-gstreamer-issues</link><generator>RSS for Node</generator><lastBuildDate>Sat, 02 May 2026 10:23:33 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/149243.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 09 Sep 2023 06:55:50 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QPdfView, QSerial port, Gstreamer issues on Sun, 10 Sep 2023 03:47:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ddddddxxx">@<bdi>ddddddxxx</bdi></a> said in <a href="/post/772149">QPdfView, QSerial port, Gstreamer issues</a>:</p>
<blockquote>
<p dir="auto">turns out that if you close port before that function finishes no data will be sent. However I don't know why is that.</p>
</blockquote>
<p dir="auto">If all that code was inside a slot then the QSerialPort object is destroyed at the end of the slot execution (current scope of object).</p>
<p dir="auto">QSerialPort, or any of the QIODevice sub-classes, will not actually send or receive data until your code enters the Qt event loop.  This happens when the slot exits but by that time your object is no more.</p>
]]></description><link>https://forum.qt.io/post/772178</link><guid isPermaLink="true">https://forum.qt.io/post/772178</guid><dc:creator><![CDATA[ChrisW67]]></dc:creator><pubDate>Sun, 10 Sep 2023 03:47:26 GMT</pubDate></item><item><title><![CDATA[Reply to QPdfView, QSerial port, Gstreamer issues on Sat, 09 Sep 2023 21:49:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a><br />
errorOccured showed QSerialPort::NoError. However I have managed to solve my problem. Probably if I would have given you full context you would manage to help me earlier as problem was that initialization of QSerialPort port_com(curr_port_info); was inside of a slot function and it turns out that if you close port before that function finishes no data will be sent. However I don't know why is that.</p>
]]></description><link>https://forum.qt.io/post/772149</link><guid isPermaLink="true">https://forum.qt.io/post/772149</guid><dc:creator><![CDATA[ddddddxxx]]></dc:creator><pubDate>Sat, 09 Sep 2023 21:49:05 GMT</pubDate></item><item><title><![CDATA[Reply to QPdfView, QSerial port, Gstreamer issues on Sat, 09 Sep 2023 18:26:16 GMT]]></title><description><![CDATA[<p dir="auto">As an additional measure, you should also add handling of the <a href="https://doc.qt.io/qt-6/qserialport.html#errorOccurred" target="_blank" rel="noopener noreferrer nofollow ugc">errorOccured</a> signal.</p>
]]></description><link>https://forum.qt.io/post/772137</link><guid isPermaLink="true">https://forum.qt.io/post/772137</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Sat, 09 Sep 2023 18:26:16 GMT</pubDate></item><item><title><![CDATA[Reply to QPdfView, QSerial port, Gstreamer issues on Sat, 09 Sep 2023 12:20:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a><br />
Yes I'm quite confident that I'm writing to the desired port as portName() seems to be correct and as I said if I try to open port that is already opened by putty for example then QT open() returns false I also have tried opening and sending  to all ports in QSerialPortInfo::availablePorts(); with no success. Oh, and there is no physical device as I don't have any I'm just making a pair of virtual ports, open one with tera term or putty and then I'm trying to open the other one and send data with QT so I will receive the data on real term/putty end. (if I use tera term/putty on boths ports connection works fine)</p>
<p dir="auto">PS. I also have tried to use other software to create virtual ports.</p>
]]></description><link>https://forum.qt.io/post/772113</link><guid isPermaLink="true">https://forum.qt.io/post/772113</guid><dc:creator><![CDATA[ddddddxxx]]></dc:creator><pubDate>Sat, 09 Sep 2023 12:20:34 GMT</pubDate></item><item><title><![CDATA[Reply to QPdfView, QSerial port, Gstreamer issues on Sat, 09 Sep 2023 10:21:43 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Might be a silly question but: are you sure you are writing to the com port your device is attached to ? From your code, there's no way to know.</p>
]]></description><link>https://forum.qt.io/post/772106</link><guid isPermaLink="true">https://forum.qt.io/post/772106</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Sat, 09 Sep 2023 10:21:43 GMT</pubDate></item><item><title><![CDATA[Reply to QPdfView, QSerial port, Gstreamer issues on Sat, 09 Sep 2023 08:59:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/chrisw67">@<bdi>ChrisW67</bdi></a> said in <a href="/post/772094">QPdfView, QSerial port, Gstreamer issues</a>:</p>
<blockquote>
<p dir="auto">QPdfView</p>
</blockquote>
<p dir="auto">I have just found QPdfView in msvc2019_64 (I was using and searching in mingw_64) so I guess this one is solved.<br />
Port com code looks something like that:</p>
<pre><code>this-&gt;serialPorts = QSerialPortInfo::availablePorts();

for (QSerialPortInfo &amp;portInfo : serialPorts) {
            if(currentIndex == 0)
                curr_port_info = portInfo;
            currentIndex--;

 }

    QSerialPort port_com(curr_port_info);
    port_com.setPortName(curr_port_info.portName());
    port_com.setBaudRate(QSerialPort::BaudRate::Baud9600);
    port_com.setParity(QSerialPort::Parity::EvenParity);
    port_com.setFlowControl(QSerialPort::FlowControl::NoFlowControl);
    port_com.setDataBits(QSerialPort::DataBits::Data8);
    port_com.setStopBits(QSerialPort::StopBits::OneStop);
    

    if(port_com.open(QIODeviceBase::ReadWrite))
        port_com.write(file);

</code></pre>
<p dir="auto">btw port_com.write(file); returns correct file size and of course if i try to open port that is already opened by tera term or putty port_com.open() returns -1</p>
]]></description><link>https://forum.qt.io/post/772097</link><guid isPermaLink="true">https://forum.qt.io/post/772097</guid><dc:creator><![CDATA[ddddddxxx]]></dc:creator><pubDate>Sat, 09 Sep 2023 08:59:44 GMT</pubDate></item><item><title><![CDATA[Reply to QPdfView, QSerial port, Gstreamer issues on Sat, 09 Sep 2023 07:52:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ddddddxxx">@<bdi>ddddddxxx</bdi></a> said in <a href="/post/772087">QPdfView, QSerial port, Gstreamer issues</a>:</p>
<blockquote>
<p dir="auto">First is QPdfView header is no where to be found QTMaintainence tool shows that I have installed Qt Pdf library, I also have tried to reinstall it and search in QT folder with no success (QT version 6.5.2).</p>
</blockquote>
<p dir="auto">Certainly installed here with the same Qt 6.5.2 version (on Linux though) and a freshly installed  "Qt Pdf" add-on</p>
<pre><code>chrisw@newton:~/Qt/6.5.2/gcc_64/include$ find . -name '*Pdf*' 
./QtPdfWidgets
./QtPdfWidgets/QtPdfWidgets
./QtPdfWidgets/QtPdfWidgetsDepends
./QtPdfWidgets/QPdfView
./QtPdfWidgets/6.5.2/QtPdfWidgets
./QtPdfWidgets/QtPdfWidgetsVersion
./QtPdf
./QtPdf/QPdfBookmarkModel
./QtPdf/QPdfDocumentRenderOptions
./QtPdf/QPdfDocument
./QtPdf/QPdfPageRenderer
./QtPdf/QPdfSearchModel
./QtPdf/QtPdfDepends
./QtPdf/QPdfLink
./QtPdf/QtPdf
./QtPdf/QPdfSelection
./QtPdf/QPdfPageNavigator
./QtPdf/6.5.2/QtPdf
./QtPdf/QtPdfVersion
./QtPdfQuick
./QtPdfQuick/QtPdfQuickVersion
./QtPdfQuick/QtPdfQuick
./QtPdfQuick/6.5.2/QtPdfQuick
./QtPdfQuick/QtPdfQuickDepends
./QtGui/QPdfWriter
</code></pre>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ddddddxxx">@<bdi>ddddddxxx</bdi></a> said in <a href="/post/772087">QPdfView, QSerial port, Gstreamer issues</a>:</p>
<blockquote>
<p dir="auto">Second problem is that when I create virtual com port pair, succesfully open one of the ports (according to QSerialPort::open) and write data to it I still don't get anything on the other end (Virtual serial port Driver indicates that the port was never opened).</p>
</blockquote>
<p dir="auto">Cannot comment without seeing the code.</p>
]]></description><link>https://forum.qt.io/post/772094</link><guid isPermaLink="true">https://forum.qt.io/post/772094</guid><dc:creator><![CDATA[ChrisW67]]></dc:creator><pubDate>Sat, 09 Sep 2023 07:52:57 GMT</pubDate></item></channel></rss>