Thread overview
Qt wrapper for D
Feb 12, 2007
Ritesh Nadhani
Feb 12, 2007
Nicolai Waniek
Feb 12, 2007
Ritesh Nadhani
Feb 13, 2007
renoX
Feb 13, 2007
John Demme
Feb 18, 2007
just jeff
Feb 18, 2007
Gregor Richards
February 12, 2007
Hello

We recently started working on a generic configuration tool and we were planning to write it in D language. Now lot of our GUI bindings are written in Qt. We would like to have a Qt wrapper for D but doing a google didnt throw up anything.

So we were wondering if writing a wrapper for Qt ourselves would be manageable? Is it very complex to write a wrapper for Qt for D?

Any pointers on how to start writing wrappers for languages? We dont have any knowledge in this regard.

Ritesh
February 12, 2007
Ritesh Nadhani wrote:
> Hello
> 
> We recently started working on a generic configuration tool and we were planning to write it in D language. Now lot of our GUI bindings are written in Qt. We would like to have a Qt wrapper for D but doing a google didnt throw up anything.
> 
> So we were wondering if writing a wrapper for Qt ourselves would be manageable? Is it very complex to write a wrapper for Qt for D?
> 
> Any pointers on how to start writing wrappers for languages? We dont have any knowledge in this regard.
> 
> Ritesh

I don't have any knowledge of Qt, but you may have a look at the [1]DUIT/gtkD project at dsource.org. They built an OOP wrapper around the gtk functions.

Nicolai


[1] http://www.dsource.org/projects/dui
February 12, 2007
Thanks Nicolai.

I will take a look into it. Also doing some Googling, I think this project is what we should look into:

http://wxd.sourceforge.net/

Its a wrapper on a C++ class which should suit Qt.

Nicolai Waniek Wrote:

> Ritesh Nadhani wrote:
> > Hello
> > 
> > We recently started working on a generic configuration tool and we were planning to write it in D language. Now lot of our GUI bindings are written in Qt. We would like to have a Qt wrapper for D but doing a google didnt throw up anything.
> > 
> > So we were wondering if writing a wrapper for Qt ourselves would be manageable? Is it very complex to write a wrapper for Qt for D?
> > 
> > Any pointers on how to start writing wrappers for languages? We dont have any knowledge in this regard.
> > 
> > Ritesh
> 
> I don't have any knowledge of Qt, but you may have a look at the [1]DUIT/gtkD project at dsource.org. They built an OOP wrapper around the gtk functions.
> 
> Nicolai
> 
> 
> [1] http://www.dsource.org/projects/dui

February 13, 2007
Ritesh Nadhani wrote:

> Hello
> 
> We recently started working on a generic configuration tool and we were planning to write it in D language. Now lot of our GUI bindings are written in Qt. We would like to have a Qt wrapper for D but doing a google didnt throw up anything.
> 
> So we were wondering if writing a wrapper for Qt ourselves would be manageable? Is it very complex to write a wrapper for Qt for D?
> 
> Any pointers on how to start writing wrappers for languages? We dont have any knowledge in this regard.
> 
> Ritesh

I don't know of any bindings for QT.  This is probably because it is a very
complex C++ library, and D cannot call C++ code directly.  You might take a
look at BCD, though:
http://www.dsource.org/projects/bcd

Theoretically, you throw bcd at some C++ header files, and it'll create the C-layer for you.  I don't know how well it actually works, though.

If you do get bindings for QT working, please post them somewhere!  I'm sure that they'd be quite popular.  It think I've seen requests for it before.

-- 
~John Demme
me@teqdruid.com
http://www.teqdruid.com/
February 13, 2007
Ritesh Nadhani a écrit :
> Thanks Nicolai.
> 
> I will take a look into it. Also doing some Googling, I think this project is what we should look into:
> 
> http://wxd.sourceforge.net/
> 
> Its a wrapper on a C++ class which should suit Qt.

Maybe, the new Java Qt interface could also be an inspiration for the how the API could look like: Java has single inheritance with interfaces, so it's a bit similar to D in that respect.

Of course this doesn't help for the implementation.

renoX

> 
> Nicolai Waniek Wrote:
> 
>> Ritesh Nadhani wrote:
>>> Hello
>>>
>>> We recently started working on a generic configuration tool and we were planning to write it in D language. Now lot of our GUI bindings are written in Qt. We would like to have a Qt wrapper for D but doing a google didnt throw up anything.
>>>
>>> So we were wondering if writing a wrapper for Qt ourselves would be manageable? Is it very complex to write a wrapper for Qt for D?
>>>
>>> Any pointers on how to start writing wrappers for languages? We dont have any knowledge in this regard.
>>>
>>> Ritesh
>> I don't have any knowledge of Qt, but you may have a look at the
>> [1]DUIT/gtkD project at dsource.org. They built an OOP wrapper around
>> the gtk functions.
>>
>> Nicolai
>>
>>
>> [1] http://www.dsource.org/projects/dui
> 
February 18, 2007
> I don't know of any bindings for QT.  This is probably because it is a very
> complex C++ library, and D cannot call C++ code directly.  You might take a
> look at BCD, though:
> http://www.dsource.org/projects/bcd
> 
> Theoretically, you throw bcd at some C++ header files, and it'll create the
> C-layer for you.  I don't know how well it actually works, though.
> 
> If you do get bindings for QT working, please post them somewhere!  I'm sure
> that they'd be quite popular.  It think I've seen requests for it before.
> 

There's already a C layer; it's called QtC, and it seems to be what other bindings (e.g. Qt# for C#, IIRC) to Qt are based on.

Qt Jambi (the Java Qt interface) could be useful, but it could be worth looking at Qt# for inspiration, as well.

Perhaps I could help in -some- way, but unfortunately I doubt I have the experience to be a major player in such a project (figuring out the architecture for the beast, etc.). I'd certainly be a rabid alpha/beta tester, though. ;)
February 18, 2007
John Demme wrote:
> Ritesh Nadhani wrote:
> 
> 
>>Hello
>>
>>We recently started working on a generic configuration tool and we were
>>planning to write it in D language. Now lot of our GUI bindings are
>>written in Qt. We would like to have a Qt wrapper for D but doing a google
>>didnt throw up anything.
>>
>>So we were wondering if writing a wrapper for Qt ourselves would be
>>manageable? Is it very complex to write a wrapper for Qt for D?
>>
>>Any pointers on how to start writing wrappers for languages? We dont have
>>any knowledge in this regard.
>>
>>Ritesh
> 
> 
> I don't know of any bindings for QT.  This is probably because it is a very
> complex C++ library, and D cannot call C++ code directly.  You might take a
> look at BCD, though:
> http://www.dsource.org/projects/bcd
> 
> Theoretically, you throw bcd at some C++ header files, and it'll create the
> C-layer for you.  I don't know how well it actually works, though.
> 
> If you do get bindings for QT working, please post them somewhere!  I'm sure
> that they'd be quite popular.  It think I've seen requests for it before.
> 

bcd.gen can't realisitically bind the Qt C++ headers. At least not now.

I would use bcd.gen to bind the QtC headers though. It's much, much easier than doing it by hand.

 - Gregor Richards