nim-lang / needed-libraries

This repository contains a list a needed libraries.
112 stars 5 forks source link

Qt GUI bindings #14

Open alehander92 opened 6 years ago

alehander92 commented 6 years ago

(From Nim community survey 2017)

mratsim commented 6 years ago

Blas, lapack tracked in #77 and provided by nimblas, neo, arraymancer.

So tracking only the QT bindings part here

treeform commented 6 years ago

There is one here: https://github.com/filcuc/nimqml Not sure how good it is.

hippylover commented 6 years ago

That's only for the qml bindings of qt.

define-private-public commented 6 years ago

While it's not quite Qt, there is CopperSpice: http://www.copperspice.com/

It's a fork of Qt 4.8 that had the goal of getting rid of the MoC. That thing was probably one of the main hindrances into developing a Nim binding. AFAIK, it is mostly API compatible (even with Qt 5), but there still are some notable differences.

michael72 commented 6 years ago

Alternatively to the aforementioned Copperspice there is Verdigris which was inspired by Copperspice and claims to have better usable macros than Copperspice and directly works with QT up to 5.10 leaving out the moc.

Seems also it has much less compile time than Copperspice as described in this article.

cornfeedhobo commented 3 years ago

Literally every year I search this topic, waiting for this to happen. It's my top use case for switching to nim, and the only reason I consider learning another language. Most other backend services I can write in what ever language I already know and is convenient.

Araq commented 3 years ago

Most other backend services I can write in what ever language I already know and is convenient.

Well Nim is the most convenient language, so you can switch to Nim already. ;-)

define-private-public commented 3 years ago

I'm not used nimqml yet, but right now I might say that could be your best bet. This does limit you to well, only the Qml portion of the Qt library, not the traditional Desktop/QtWidgets part. As someone who has worked with both ways of building GUI apps using Qt, I would recommend you build any future GUI applications with Qml. Transitioning from Desktop/QtWidgets to Qml can be quite confusing at first, but later on things do start to make a lot more sense.

tl;dr: Use Qml with Nim.

zocker-160 commented 3 years ago

I would recommend you build any future GUI applications with Qml.

@define-private-public out of curiosity: why exactly is this the case?

define-private-public commented 3 years ago

Qml is much more flexible compared to the traditional Desktop/Widgets API. As well as it should be hardware accelerated. You can also have much more control over how your app looks cross platform (including mobile & desktop). It's also much more touch friendly.

kraptor commented 3 years ago

Qml is much more flexible compared to the traditional Desktop/Widgets API. As well as it should be hardware accelerated. You can also have much more control over how your app looks cross platform (including mobile & desktop). It's also much more touch friendly.

This is true to some extent. For boring desktop business apps, using the traditional toolkits is a lot more convenient:

I see both approaches as complementary, but denying the benefits of the traditional API is more than questionable.

Sure, if you want/need a flashy electron-like application with the current concept of "modern", go ahead with QML. When you need boring business apps there is a clear winner as of today.

EDIT: grammar, typos.

jerous86 commented 1 year ago

Literally every year I search this topic, waiting for this to happen. It's my top use case for switching to nim, and the only reason I consider learning another language. Most other backend services I can write in what ever language I already know and is convenient.

This year is the year: nimqt :)