Can Qt host WPF controls?
-
wrote on 14 Jun 2011, 16:03 last edited by
Thanks, Kurt
-
wrote on 14 Jun 2011, 20:35 last edited by
Just try if you can host a WPF control in a normal WinAPI based window. Qt has some possibilities to get window handles and that stuff - I think if you could manage it to host a WPF control in window given its HWND it should be fairly easy to do the same on QT side – I think you have to do some COM magic to get this working… very ugly…
Microsoft describes only ways of hosting a WPF component in managed C++ Win32 applictaions - see here http://msdn.microsoft.com/en-us/library/aa970266.aspx
I did not found a pure Win32 application that hosts a WPF component
I do not know if QT works with managed c++ - just try it out and report your results here
I think it would be rather cool if QT has a "standard way" of hosting WPF components
-
wrote on 15 Jun 2011, 20:33 last edited by
I'm not a windows guy and totally not a .net guy. But as a wild guess: maybe C# bindings will help you in this (Qyoto)?
-
wrote on 15 Jun 2011, 22:24 last edited by
I search a bit and found this: http://www.netframeworkdev.com/windows-presentation-foundation-wpf/can-win32-cpp-host-wpf-without-the-clr-switch-86865.shtml
It seems like you need some COM/ActiveX magic to get it done without managed C++ (/clr switch)
maybe someday someone will provide a QWPFHostWidget ...
-
wrote on 15 Jun 2011, 23:59 last edited by
@denis, as I understand Qyoto makes it possible to develop Qt and KDE applications using C#, or any other .NET language (see http://techbase.kde.org/Development/Languages/Qyoto). In other words for .NET to host Qt widgets, but I don't think the other way, Qt hosting .NET/WPF widgets. Is that others understanding as well?
Also, is Qyoto stable enough for an ISV with millions of lines of Qt code to build strategy for integration with .NET on?
@vertexwahn, thanks I will look in to that. Since Qt is pure Win32 then if Win32 can host WPF should work?
Can Qt host other types of controls such as ActiveX controls?
Thanks, Kurt
-
wrote on 16 Jun 2011, 00:22 last edited by
The documentation "Dot Net Example (ActiveQt)", http://developer.qt.nokia.com/doc/qt-4.7/activeqt-dotnet.html , says that "If you need to combine Qt and Win Forms widgets in the same application, you might want to use the higher-level QtWinForms Solution instead." But QtWinForms link does not work, although I found this, http://doc.trolltech.com/solutions/4/qtwinforms/qtclock-example.html
Where can I find QtWinForms?
The sample seems to leverage QtWinFormsUtils, so like you said @vertexwahn, perhaps if had QtWPFHostWidget or QtWPFUtils would simplify hosting of WPF in Qt.
-
wrote on 16 Jun 2011, 01:01 last edited by
[quote author="pisees" date="1308182380"] Can Qt host other types of controls such as ActiveX controls?[/quote]
Looks like yes, http://developer.qt.nokia.com/doc/qt-4.7/qt-activex.html
-
wrote on 16 Jun 2011, 10:30 last edited by
If you can host a WPF control in a native Win32 application it should also work in Qt.
-
wrote on 16 Jun 2011, 11:07 last edited by
The same discussion happens here: "Where can I find QtWinForms Solution":http://developer.qt.nokia.com/forums/viewthread/6839/
-
wrote on 16 Jun 2011, 15:46 last edited by
[quote author="Gerolf" date="1308222452"]The same discussion happens here: "Where can I find QtWinForms Solution":http://developer.qt.nokia.com/forums/viewthread/6839/[/quote]
The above reference indicates that ActiveQt supports hosting Windows Forms. Could it not then also support WPF?
-
wrote on 16 Jun 2011, 18:35 last edited by
ActiveQt supports COM, and you can host windows forms as COM objects. So you can host any COM obejsct and ActiveX objects inside it.
-
wrote on 17 Jun 2011, 22:17 last edited by
Maybe this can help you
http://www.codeproject.com/KB/toolbars/Ribbon.aspx
1/12