Thread overview | ||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
October 13, 2013 Qt bindings for D | ||||
---|---|---|---|---|
| ||||
Hi guys a few months ago I tried to find working bindings for Qt and the best I could see was qtd. I tried compiling it but it didn't go too well on my Linux 64bit machine, and saw in the forums that the original developers had ceased maintaining it. Because I have been using Qt for around 10 years or so now (mainly from python but a little C++ too) I had a go at getting it to work again. It took a few weekends but I got the main examples going (Core, GUI, XML etc) with Qt 4.8 and 2.062. I felt that I was having to do some rewinding of where the original developers were going (it seemed that they were trying to take QRect et al down the struct route, but my to my newbie eyes it seemed doomed because it was making assumptions about the way the C++ and D compilers were laying out the struct data that didn't work on my machine - but I could be wrong about that). Anyway I treated it as an educational exercise and make QRect et al. regular classes, and got it generally working again. Then real life took over again and I had to shelve the project, but now I have a little spare time again. I suspect there are other developers such as myself out there who are keen to try D but would like to use it with Qt, so I thought I would let you know what I had done in case others were interested. I'm kind of hoping that someone will say that the job is already done, but I suspect that is not the case. The original developers did a really great job of the wrapping and left the build system in a really good state too. However, there seems to be very little testing other than the standard qt examples themselves, so I can't be sure exactly where the wrapping stands. Although the original developers felt that it had some way to go before being really useful, it seems to me that they had achieved more than that and that some would want to use it as it stood. Unfortunately the wrapping is based on QtJambi, which is now dead, but anyway it's easy with hindsight isn't it. Is anyone else interested and can anyone help me with polishing it? It needs testing, trying out on Windows, and some improvements to the build system. I have very little time ATM but it would be good to capture where I've got to so that others could pick it up or just experiment with D and Qt. regards Abdulhaq |
October 13, 2013 Re: Qt bindings for D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Abdulhaq | On Sunday, 13 October 2013 at 12:39:55 UTC, Abdulhaq wrote:
> Hi guys
>
> a few months ago I tried to find working bindings for Qt and the best I could see was qtd. I tried compiling it but it didn't go too well on my Linux 64bit machine, and saw in the forums that the original developers had ceased maintaining it. Because I have been using Qt for around 10 years or so now (mainly from python but a little C++ too) I had a go at getting it to work again.
>
> It took a few weekends but I got the main examples going (Core, GUI, XML etc) with Qt 4.8 and 2.062. I felt that I was having to do some rewinding of where the original developers were going (it seemed that they were trying to take QRect et al down the struct route, but my to my newbie eyes it seemed doomed because it was making assumptions about the way the C++ and D compilers were laying out the struct data that didn't work on my machine - but I could be wrong about that). Anyway I treated it as an educational exercise and make QRect et al. regular classes, and got it generally working again.
>
> Then real life took over again and I had to shelve the project, but now I have a little spare time again. I suspect there are other developers such as myself out there who are keen to try D but would like to use it with Qt, so I thought I would let you know what I had done in case others were interested. I'm kind of hoping that someone will say that the job is already done, but I suspect that is not the case.
>
> The original developers did a really great job of the wrapping and left the build system in a really good state too. However, there seems to be very little testing other than the standard qt examples themselves, so I can't be sure exactly where the wrapping stands. Although the original developers felt that it had some way to go before being really useful, it seems to me that they had achieved more than that and that some would want to use it as it stood.
>
> Unfortunately the wrapping is based on QtJambi, which is now dead, but anyway it's easy with hindsight isn't it.
>
> Is anyone else interested and can anyone help me with polishing it? It needs testing, trying out on Windows, and some improvements to the build system. I have very little time ATM but it would be good to capture where I've got to so that others could pick it up or just experiment with D and Qt.
>
> regards
> Abdulhaq
Is it Qt5 compatible?
|
October 13, 2013 Re: Qt bindings for D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Elvis Zhou | On Sunday, 13 October 2013 at 13:45:13 UTC, Elvis Zhou wrote:
> On Sunday, 13 October 2013 at 12:39:55 UTC, Abdulhaq wrote:
>> Hi guys
>>
>> a few months ago I tried to find working bindings for Qt and the best I could see was qtd. I tried compiling it but it didn't go too well on my Linux 64bit machine, and saw in the forums that the original developers had ceased maintaining it. Because I have been using Qt for around 10 years or so now (mainly from python but a little C++ too) I had a go at getting it to work again.
>>
>> It took a few weekends but I got the main examples going (Core, GUI, XML etc) with Qt 4.8 and 2.062.
>
> Is it Qt5 compatible?
I'd hope so, barring a few tweaks, but due to time constraints I haven't made any attempt at that yet. It certainly hasn't got any of the QML stuff though.
The wrapper works by declaring classes and methods to be wrapped in XML files, so any new classes introduced in 4.9+ wil not be present.
|
October 13, 2013 Re: Qt bindings for D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Abdulhaq | Am 13.10.2013 16:22, schrieb Abdulhaq:
> On Sunday, 13 October 2013 at 13:45:13 UTC, Elvis Zhou wrote:
>> On Sunday, 13 October 2013 at 12:39:55 UTC, Abdulhaq wrote:
>>> Hi guys
>>>
>>> a few months ago I tried to find working bindings for Qt and the best
>>> I could see was qtd. I tried compiling it but it didn't go too well
>>> on my Linux 64bit machine, and saw in the forums that the original
>>> developers had ceased maintaining it. Because I have been using Qt
>>> for around 10 years or so now (mainly from python but a little C++
>>> too) I had a go at getting it to work again.
>>>
>>> It took a few weekends but I got the main examples going (Core, GUI,
>>> XML etc) with Qt 4.8 and 2.062.
>>
>> Is it Qt5 compatible?
>
> I'd hope so, barring a few tweaks, but due to time constraints I haven't
> made any attempt at that yet. It certainly hasn't got any of the QML
> stuff though.
>
> The wrapper works by declaring classes and methods to be wrapped in XML
> files, so any new classes introduced in 4.9+ wil not be present.
>
>
>
>
>
Qt had quite a lot of breaking changes in 5.x versions, so it won't be that easy.
--
Paulo
|
October 13, 2013 Re: Qt bindings for D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Abdulhaq | On Sunday, 13 October 2013 at 14:22:05 UTC, Abdulhaq wrote:
> On Sunday, 13 October 2013 at 13:45:13 UTC, Elvis Zhou wrote:
>> On Sunday, 13 October 2013 at 12:39:55 UTC, Abdulhaq wrote:
>>> Hi guys
>>>
>>> a few months ago I tried to find working bindings for Qt and the best I could see was qtd. I tried compiling it but it didn't go too well on my Linux 64bit machine, and saw in the forums that the original developers had ceased maintaining it. Because I have been using Qt for around 10 years or so now (mainly from python but a little C++ too) I had a go at getting it to work again.
>>>
>>> It took a few weekends but I got the main examples going (Core, GUI, XML etc) with Qt 4.8 and 2.062.
>>
>> Is it Qt5 compatible?
>
> I'd hope so, barring a few tweaks, but due to time constraints I haven't made any attempt at that yet. It certainly hasn't got any of the QML stuff though.
>
> The wrapper works by declaring classes and methods to be wrapped in XML files, so any new classes introduced in 4.9+ wil not be present.
It will gain more attention if targeting Qt5 IMHO.
|
October 13, 2013 Re: Qt bindings for D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Abdulhaq | On Sunday, 13 October 2013 at 12:39:55 UTC, Abdulhaq wrote:
> […]
> Unfortunately the wrapping is based on QtJambi, which is now dead, but anyway it's easy with hindsight isn't it.
>
> Is anyone else interested and can anyone help me with polishing it? […]
I'm very interested in having solid Qt bindings available, and I worked on QtD a while back.
One thing I've been wondering about is whether keeping the QtJambi-based generator makes sense or if it would be easier start anew from some of the more active binding projects…
David
|
October 13, 2013 Re: Qt bindings for D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Elvis Zhou | On Sunday, 13 October 2013 at 16:05:24 UTC, Elvis Zhou wrote:
> On Sunday, 13 October 2013 at 14:22:05 UTC, Abdulhaq wrote:
>> On Sunday, 13 October 2013 at 13:45:13 UTC, Elvis Zhou wrote:
>>> On Sunday, 13 October 2013 at 12:39:55 UTC, Abdulhaq wrote:
>>>> Hi guys
>>>>
>>>> a few months ago I tried to find working bindings for Qt and the best I could see was qtd. I tried compiling it but it didn't go too well on my Linux 64bit machine, and saw in the forums that the original developers had ceased maintaining it. Because I have been using Qt for around 10 years or so now (mainly from python but a little C++ too) I had a go at getting it to work again.
>>>>
>>>> It took a few weekends but I got the main examples going (Core, GUI, XML etc) with Qt 4.8 and 2.062.
>>>
>>> Is it Qt5 compatible?
>>
>> I'd hope so, barring a few tweaks, but due to time constraints I haven't made any attempt at that yet. It certainly hasn't got any of the QML stuff though.
>>
>> The wrapper works by declaring classes and methods to be wrapped in XML files, so any new classes introduced in 4.9+ wil not be present.
>
> It will gain more attention if targeting Qt5 IMHO.
Agreed but that is a much bigger task than getting qtd/4.8 going well. As a long time Qt developer I'm very happy with 4.8 as a very classy cross-platform GUI, and having it as a solid option would make D a very interesting language for me - I don't need the convenience of the declarative option, or the mobile API. I'd really like to get VTK visualisation toolkit going too, but I guess than can wait for the Xmas hols :-)
|
October 13, 2013 Re: Qt bindings for D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Paulo Pinto | On Sunday, 13 October 2013 at 15:44:18 UTC, Paulo Pinto wrote:
> Am 13.10.2013 16:22, schrieb Abdulhaq:
>> On Sunday, 13 October 2013 at 13:45:13 UTC, Elvis Zhou wrote:
>>> On Sunday, 13 October 2013 at 12:39:55 UTC, Abdulhaq wrote:
>>>> Hi guys
>>>>
>>>> a few months ago I tried to find working bindings for Qt and the best
>>>> I could see was qtd. I tried compiling it but it didn't go too well
>>>> on my Linux 64bit machine, and saw in the forums that the original
>>>> developers had ceased maintaining it. Because I have been using Qt
>>>> for around 10 years or so now (mainly from python but a little C++
>>>> too) I had a go at getting it to work again.
>>>>
>>>> It took a few weekends but I got the main examples going (Core, GUI,
>>>> XML etc) with Qt 4.8 and 2.062.
>>>
>>> Is it Qt5 compatible?
>>
>> I'd hope so, barring a few tweaks, but due to time constraints I haven't
>> made any attempt at that yet. It certainly hasn't got any of the QML
>> stuff though.
>>
>> The wrapper works by declaring classes and methods to be wrapped in XML
>> files, so any new classes introduced in 4.9+ wil not be present.
>>
>>
>>
>>
>>
>
>
> Qt had quite a lot of breaking changes in 5.x versions, so it won't be that easy.
>
> --
> Paulo
Yep I just checked and have to agree with you
|
October 13, 2013 Re: Qt bindings for D | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Nadlinger | On Sunday, 13 October 2013 at 16:20:33 UTC, David Nadlinger wrote:
> On Sunday, 13 October 2013 at 12:39:55 UTC, Abdulhaq wrote:
>> […]
>> Unfortunately the wrapping is based on QtJambi, which is now dead, but anyway it's easy with hindsight isn't it.
>>
>> Is anyone else interested and can anyone help me with polishing it? […]
>
> I'm very interested in having solid Qt bindings available, and I worked on QtD a while back.
>
> One thing I've been wondering about is whether keeping the QtJambi-based generator makes sense or if it would be easier start anew from some of the more active binding projects…
>
> David
I think QtJambi solved a lot of problems that you get when binding Java to C++, but I'm not so sure about how it helps with D. The rich XML specification files must have very helpful, and the handling of how Qt automatically deletes child objects when reqd must have been useful.
Having used Qt extensively with python I know that performance is not a huge issue so clarity of the binding is more important. As a D newbie there's some complicated coding going on in qtd that is hard to grok and few tests.
However I'm pretty sure that starting over would take a lot longer than finishing what's there now, tempting though the idea is:-)
My current feeling is that what is needed is plenty of tests around memory handling, array handling, signals and slots, and the more unusual method calls. Get rid of any remaining code that does not easily run in a croos-platform manner.
|
October 13, 2013 Re: Qt bindings for D | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Nadlinger | On Sunday, 13 October 2013 at 16:20:33 UTC, David Nadlinger wrote: > On Sunday, 13 October 2013 at 12:39:55 UTC, Abdulhaq wrote: >> […] >> Unfortunately the wrapping is based on QtJambi, which is now dead, but anyway it's easy with hindsight isn't it. >> >> Is anyone else interested and can anyone help me with polishing it? […] > > I'm very interested in having solid Qt bindings available, and I worked on QtD a while back. > > One thing I've been wondering about is whether keeping the QtJambi-based generator makes sense or if it would be easier start anew from some of the more active binding projects… > > David Perhaps KDE's SMOKE? http://techbase.kde.org/Development/Languages/Smoke |
Copyright © 1999-2021 by the D Language Foundation