PDA

View Full Version : coming from XAML



tsadigov
1st April 2012, 03:03
Hi guys
I am .NET developer very interested in QT, but before delving into it I want to know some things about it. I will try to compare it to WPF/Silverlight if anyone knows a feature comparison list please provide a link.

question 1: is rendering hardware accelerated?

question 2: can you provide custom pixel shader effects (HLSL)

question 3: does QML support control templating? I mean in WPF controls know only about conceptual items and u can provide a visual element tree to make it look however you want it. Does QML have equivalent? Can I tell it to use another look and feel for all buttons in a window?

question 4: does QML support data templating and DataBinding. For list controls I want to be able to provide more user friendly representations providing data templates which have child controls databound to the dataItem which is provided upon execution.

I guess all of this is possible in some way, but I need an answer from a person who knows for sure.

wysota
1st April 2012, 10:52
question 1: is rendering hardware accelerated?
When speaking about graphics, everything (well... almost) in Qt can be accelerated by using OpenGL. You don't even need to know OpenGL itself, Qt will translate calls for you. Since Qt5 the acceleration should be even better because of the use of scene graph approach.


question 2: can you provide custom pixel shader effects (HLSL)
With OpenGL, yes. With QML I'm not sure, I'm not an expert on shaders, but I think that you can (since Qt5 at least).


question 3: does QML support control templating I mean in WPF controls know only about conceptual items and u can provide a visual element tree to make it look however you want it. Does QML have equivalent?
For some elements, yes.

Can I tell it to use another look and feel for all buttons in a window?
QtQuick (QML) is not the best approach for creating buttons and windows but yes, you can, in some circumstances at least. With Qt/C++ you have almost total control over the rendering of GUI components.


question 4: does QML support data templating and DataBinding. For list controls I want to be able to provide more user friendly representations providing data templates which have child controls databound to the dataItem which is provided upon execution.
I don't know what "data templating" is so it is hard to come up with a reasonable answer here. You can provide something called a delegate (not to confuse with C# delegates) for any view that controls rendering of each item in the data model.

tsadigov
1st April 2012, 15:12
Thanks for answers

as far as I understood the delegates are adapters that selects and provides UI widget for list item, in this it is like TemplateSelector which decides which template to use for elements in the list. The template in WPF is like widget, just a tree of visuals.

Because the two frameworks are created to solve the same problem (UI development) there are many similarities, some comparison would be great for those who knows one and wants to try the other.

I think this document could be o help http://windowsphone.interoperabilitybridges.com/tagsearchresults/?tag=Qt
although it was written for those going from qt to wpf I will try to use it for reverse conversion :)

wysota
1st April 2012, 15:29
I think this document could be o help http://windowsphone.interoperabilitybridges.com/tagsearchresults/?tag=Qt
although it was written for those going from qt to wpf I will try to use it for reverse conversion :)

It could be hard as there is not a bit of Qt code behind the link you provided.