www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Qt wrapper for D

reply Ritesh Nadhani <riteshn gmail.com> writes:
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
Feb 12 2007
next sibling parent reply Nicolai Waniek <no.spam thank.you> writes:
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
Feb 12 2007
parent reply Ritesh Nadhani <riteshn gmail.com> writes:
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
Feb 12 2007
parent renoX <renosky free.fr> writes:
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
Feb 13 2007
prev sibling parent reply John Demme <me teqdruid.com> writes:
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/
Feb 12 2007
next sibling parent just jeff <jeffrparsons optusnet.com.au> writes:
 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 Qt Jambi (the Java Qt interface) could be useful, but it could be worth 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. ;)
Feb 17 2007
prev sibling parent Gregor Richards <Richards codu.org> writes:
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
Feb 18 2007