<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi,<br>
<br>
XAML rendering is not supported out of the box, and probably won't be any time soon. You need modify Qt to do this, so read the code review links I pasted earlier. This experimental territory, so you're on you're own here.<br>
<br>
Feel free to comment on the code reviews themselves if there are parts you don't understand.<br>
<br>
Cheers,<br>
Andrew<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF960516"><font color="#000000" face="Tahoma" size="2"><b>From:</b> Đèn cù Phan Quang Huy [matdennoigi@gmail.com]<br>
<b>Sent:</b> Tuesday, August 26, 2014 11:17 AM<br>
<b>To:</b> Knight Andrew<br>
<b>Cc:</b> interest@qt-project.org<br>
<b>Subject:</b> Re: [Interest] XAML and CX in Qt for Windows Phone<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">Dear Andrew,
<div><br>
</div>
<div>Recently, i was a bit busy so i can tried it today. (ZW) extension only enable to use CX. I want to render Qt to XAML scene graph. How can i do it???</div>
<div><br>
</div>
<div>Sorry for my poor English :) ! </div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Fri, Aug 15, 2014 at 4:35 PM, Đèn cù Phan Quang Huy <span dir="ltr">
<<a href="mailto:matdennoigi@gmail.com" target="_blank">matdennoigi@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div dir="ltr">Thanks, Andrew!
<div>I will try it.</div>
</div>
<div class="HOEnZb">
<div class="h5">
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Thu, Aug 14, 2014 at 2:52 AM, Knight Andrew <span dir="ltr">
<<a href="mailto:Andrew.Knight@digia.com" target="_blank">Andrew.Knight@digia.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div>Huy Phan Quang wrote:<br>
> So, it mean "i must rebuild qt source code"???<br>
<br>
</div>
Not for using C++/CX in your application (why would it)? You just need to tell the compiler to enable the extensions (/ZW). Qt will happily link just the same.<br>
<br>
-Andrew<br>
<br>
---<br>
<div>
<div><br>
From:<br>
Knight Andrew<br>
<br>
Sent:<br>
‎13/‎08/‎2014 4:32 CH<br>
<br>
To:<br>
Đèn cù Phan Quang Huy;<br>
<br>
<a href="mailto:interest@qt-project.org" target="_blank">interest@qt-project.org</a><br>
<br>
Subject:<br>
RE: [Interest] XAML and CX in Qt for Windows Phone<br>
<br>
<br>
<br>
<br>
Hi,<br>
<br>
<br>
<br>
> Hi all !<br>
<br>
><br>
<br>
> In Windows Phone 8, Microsoft provided a new technique for native development (C++). There are 2 template for native :<br>
<br>
><br>
<br>
> Native Only (only use C++) template: this template only use pure C++ with limited access to Platform API (C# implementation like Camera, Push Notification, etc.). It has been only used<br>
<br>
>  for game development (with DirectX). XAML + C# + C++ template: with this template, in fact, it is “general Windows Phone template” with XAML for<br>
<br>
>  layout, C# for logic processing and C++ for backend heavily processing. Example, the game render would be written in C++ (like native only) but it would be rendered on a control in XAML. MS provided a mechanism<br>
<br>
>  for communicate between C# and C++, is “CX” (much like C++.net) and it much like JNI mechanism in Android. CX allows C++ can access C# Platform API,<br>
<br>
>  which can’t be accessed directly from C++.<br>
<br>
><br>
<br>
><br>
<br>
> In Qt, when i want to build for Windows Phone, i will create Visual Studio Solution by “qmake” and build it in Visual Studio, but the output solution of it is > “Native Only Template”, thus i can’t write CX and integrated any Ad Banner for my app.<br>
<br>
><br>
<br>
> Please add qmake optional for create Xaml template. It's very useful!<br>
<br>
<br>
<br>
As you have noted, Windows Phone allows for "Native Only" development, and this is what Qt uses. We do not use any CX, C#, or XAML in the Qt codebase, and this is likely to remain the case as we go along.<br>
<br>
<br>
<br>
That said, there is nothing preventing you from using CX in your code. You simply need to add<br>
<br>
    QMAKE_CXXFLAGS += -ZW<br>
<br>
to your .pro file to enable the extensions.<br>
<br>
<br>
<br>
XAML integration is also possible in theory, but it requires major changes to Qt. If you're not planning to use any Qt UI integration (Widgets, Qt Quick, etc.), then you probably won't have any serious issues using XAML, though. The two experiments are available<br>
 on Code Review:<br>
<br>
<a href="https://codereview.qt-project.org/86264" target="_blank">https://codereview.qt-project.org/86264</a><br>
<br>
<a href="https://codereview.qt-project.org/88593" target="_blank">https://codereview.qt-project.org/88593</a><br>
<br>
They involve modifying winmain, a static BSD-licensed support library in qtbase. You are welcome to do something similar in your app; just rebuild winmain or link to your version of winmain instead.<br>
<br>
<br>
<br>
So, to summarize: we don't use these features in Qt (and have no plans to), but there are ways to use them in your app.<br>
<br>
<br>
<br>
HTH,<br>
<br>
Andrew<br>
<br>
<br>
<br>
P.S. What ad banner framework are you using? It may actually be possible to use it from native C++ by generating headers from the winrtmidl compiler.<br>
<br>
<br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</body>
</html>