[Mono-list] Qtcsharp / Windows.Forms
Richard Dale
Richard_Dale@tipitina.demon.co.uk
Wed, 27 Mar 2002 23:08:03 +0000
On Wednesday 27 March 2002 6:57 pm, Jason Keirstead wrote:
> Hey how's it going. I checked out the latest qtc and qtcsharp from KDE CVS
> today, and built libqtc. Then I booted into windows and built Qt.dll, and
> built a test.cs file. Then back to Linux and... it worked perfect! I am
> very impressed. I have two questions for you however:
>
> 1) Is it possible to build a libqtc.dll for Windows, so that programs
> written in qtcsharp can be run in windows?
Yes, it should be quite easy to port the QtC bindings to Windows. Just comment
out any X11 specific methods that don't compile, and remove the QPrintDialog
class which doesn't exist on Qt for Windows. But there's no Free edition of
Qt 3 for Windows, only Qt 2.3.
> 2) If 1 is possible (or if mono 0.10 is advanced along enough so as to make
> building test programs on linux possible, dunno haven't gotten a change to
> check it out yet), and you have not started to do so already, I would be
> willing to start helping on a Windows.Forms layer for the qtcsharp
> bindings.
Would it be possible to autogenerate the Windows.Forms layer? You could
nominate a Qt peer class for each of the Windows.Forms controls.
For instance, QComboBox would map onto a WinComboBox or whatever the
Windows.Forms combo box control is called. Then would it be possible to map
standard Window.Forms methods onto the Qt equivalents in a code generator?
QComboBox.insertItem(String item, int index) must have an equivalent Windows
method with a different name. So you could generate a
'WinComboBox.myInsertMethod()' which would call QComboBox.insertItem().
Otherwise, it could be a lot of manual work and editing I would have thought.
-- Richard