Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Can Qt host WPF controls?
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
DenisKormalev 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)?
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 ...
@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?
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.
[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
If you can host a WPF control in a native Win32 application it should also work in Qt.
giesbert last edited by
The same discussion happens here: "Where can I find QtWinForms Solution":http://developer.qt.nokia.com/forums/viewthread/6839/
[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?
giesbert 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.
Maybe this can help you