Results 1 to 7 of 7

Thread: Qt and .NET

  1. #1
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Qt and .NET

    I need to use Qt for a GUI on a "legacy" .NET application used managed C++. The .NET backend is used for system level calls. I'll be using VS2005 There's a lot of good information at this page <http://doc.trolltech.com/4.1/activeqt-dotnet.html> at Trolltech. But it doesn't cover everything. My main concerns center around using QApplication, QMainWindow, and .NET events. Has anyone used Qt with .NET and "managed" C++? Any tips?

  2. #2
    Join Date
    Jun 2006
    Posts
    11
    Thanked 4 Times in 4 Posts

    Default Re: Qt and .NET

    It's important to remember that managed C++ is not C++ but a language of its own, though very similar to C++. Thus you can (probably not) write a managed app with Qt.
    As for using Qt and .Net events that not possible either (at least not for GUI-events) since the events-mechanism is part of the GUI-framework, if you use Qt you use the Qt way, if you use .Net you use the .Net way (however you might be able to use events for non-GUI events in the backend).
    Should the backend be written in managed C++ I don't think you can compile it's code together with Qt-code directly but you might be able to link it together (I'm not too familiar with the workings of managed code, you'll have to do some research on MSDN for that).

  3. The following user says thank you to eriwik for this useful post:

    Brandybuck (3rd July 2006)

  4. #3
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qt and .NET

    There is a Qt Solution called "Qt Windows Forms Interop" that manages to mix Windows Forms controls and Qt Widgets. I'm looking it over to see if it's suitable for what I need.

  5. #4
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qt and .NET

    Finally got a sample application working. The front end is Qt, the backend uses a few bits of the .NET System namespace. My biggest stumbling block was the lack of adequate documenation for C++.NET. It was several hours into the project before I realized that Microsoft had yet again changed the language. C++.NET 2003 is a subtly [b]different[/] language than C++.NET 2005! Neither of which is true C++. (If Ada was a language designed by committee, C++.NET is a language designed by a corporation).

    Qt is still superior to .NET, but Qt doesn't do everything. There are still times you'll need to drop down to the OS level, regardless of OS, and under Windows that increasingly means .NET.

  6. #5
    Join Date
    Jun 2006
    Posts
    11
    Thanked 4 Times in 4 Posts

    Default Re: Qt and .NET

    Quote Originally Posted by Brandybuck
    My biggest stumbling block was the lack of adequate documenation for C++.NET.
    There's a lot of things one can blame microsoft for but not for a lack of documentation, on MSDN you can find about anything you'll ever want to know about programming with .NET/VS, thoug it can be a bit hard to find.

  7. #6
    Join Date
    Jan 2006
    Posts
    75
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt and .NET

    Is there a lot of documentation on MSDN?

    Yes.

    Is is horribly organized?

    Absolutely.

  8. #7
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qt and .NET

    Quote Originally Posted by eriwik
    There's a lot of things one can blame microsoft for but not for a lack of documentation, on MSDN you can find about anything you'll ever want to know about programming with .NET/VS, thoug it can be a bit hard to find.
    That's precisely my problem with the MS documentation: you can't find anything. I guess my wording was poor. There's reams and reams of "inadequate" documentation, but the "adequate" documentation is hard to find.

Similar Threads

  1. Can't configure for Win32 MSVC .NET
    By saber850 in forum Installation and Deployment
    Replies: 8
    Last Post: 28th February 2006, 16:42

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.