<?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[Local file format]]></title><description><![CDATA[<p dir="auto">I am slowly coming to the solution of the age-old problem of reading metadata. These are my experimental observations:</p>
<p dir="auto">reader is a in a istance of <code>QMediaPlayer</code>, and playlist is a istance of <code>QMediaPlaylist</code></p>
<p dir="auto">If I write</p>
<pre><code>reader-&gt;setMedia(QUrl::fromLocalFile("D:/mysong.mp3"));
</code></pre>
<p dir="auto">The metadata is read correctly on the signal  <code>QMediaPlayer::LoadedMedia</code>.</p>
<p dir="auto">But when I try to load the file from the playlist, the code doesn't work</p>
<pre><code>reader-&gt;setMedia((playlist-&gt;media(n)));
</code></pre>
<p dir="auto">with <code>n</code> a natural number</p>
<p dir="auto">Any suggestion?</p>
<p dir="auto">Thank you in advance</p>
]]></description><link>https://forum.qt.io/topic/110305/local-file-format</link><generator>RSS for Node</generator><lastBuildDate>Sat, 08 Aug 2026 00:17:59 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/110305.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 03 Jan 2020 13:54:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Local file format on Fri, 03 Jan 2020 20:19:31 GMT]]></title><description><![CDATA[<p dir="auto">Solved</p>
<pre><code>QString mediafile = playlist-&gt;media(n).request().url().toString();
QFileInfo fi(mediafile);
reader-&gt;setMedia(QUrl::fromLocalFile(fi.absoluteFilePath()));
</code></pre>
]]></description><link>https://forum.qt.io/post/570332</link><guid isPermaLink="true">https://forum.qt.io/post/570332</guid><dc:creator><![CDATA[UnitScan]]></dc:creator><pubDate>Fri, 03 Jan 2020 20:19:31 GMT</pubDate></item></channel></rss>