<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hey,<div><br></div><div>If you have this in your .yaml:</div><div>
<pre style="margin-top: 0px; margin-bottom: 0px;"><br></pre><pre style="margin-top: 0px; margin-bottom: 0px;"><!--StartFragment-->Version:<span style=" color:#c0c0c0;"> </span>1.0.0<!--EndFragment--></pre><div><br></div></div><div>
<pre style="margin-top: 0px; margin-bottom: 0px;"><!--StartFragment-->QMakeOptions:</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#808000;">-</span><span style=" color:#c0c0c0;"> </span>VERSION=<span style=" color:#008000;">'%{version}-%{release}'</span><!--EndFragment--></pre><div><br></div><div>Then you can do this in your .pro file:</div><div>
<pre style="margin-top: 0px; margin-bottom: 0px;"><!--StartFragment--><span style=" color:#800080;">DEFINES</span><span style=" color:#c0c0c0;"> </span>+=<span style=" color:#c0c0c0;"> </span>APP_VERSION=\\\"$$VERSION\\\"<!--EndFragment--></pre><div><br></div></div><div>That gives you the option to do this in your main.cpp:</div><div>
<pre style="margin-top: 0px; margin-bottom: 0px;"><!--StartFragment--><span style=" color:#800080;">QScopedPointer</span><<span style=" color:#800080;">QQuickView</span>><span style=" color:#c0c0c0;"> </span>view(<span style=" color:#800080;">SailfishApp</span>::createView());</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;">view->rootContext()->setContextProperty(<span style=" color:#008000;">"APP_VERSION"</span>,<span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">APP_VERSION</span>);<!--EndFragment--></pre><div><br></div></div><div><br></div><div>And BOOM! now you can use APP_VERSION wherever in your QML (AboutPage.qml for example)</div><div><br></div><div>:)</div><div><br></div><div>//b0bben</div><div><br></div><div><div>On 20 Jul 2014, at 13:26, Chris Walker <<a href="mailto:cdw_nokiaqt@the-walker-household.co.uk">cdw_nokiaqt@the-walker-household.co.uk</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Is there any way to have my 'About' page pick up the Version and<br>Release information from the yaml file?<br><br>At the moment, I'm hard coding the versioninfo in the About page but<br>I'd like it to be updated automagically in the future.<br><br>I looked around but couldn't see this information anywhere so I'm<br>guessing that this question hasn't been asked/answered before but if it<br>has, please feel free to point me in the right direction.<br>_______________________________________________<br><a href="http://SailfishOS.org">SailfishOS.org</a> Devel mailing list<br>To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org">devel-unsubscribe@lists.sailfishos.org</a><br></blockquote></div><br></div></body></html>