ddobrev / QtSharp

Mono/.NET bindings for Qt
Other
571 stars 51 forks source link

Coverage #67

Closed ShalokShalom closed 6 years ago

ShalokShalom commented 7 years ago

Your README speaks less about the current state of the project.

On the homepage of MonoDevelop is QtSharp very underrepresented currently, without any screenshot and described as "Still in early development."

Is this still true?

ddobrev commented 7 years ago

@ShalokShalom Qt# is already in beta, you can find links to the releases and examples in the README. The only major missing piece is template classes and members which I have almost completed.

ShalokShalom commented 7 years ago

And so far as I get this .Net framework thing, is it possible to use C# to call QML in order to embed that combination into a F# project, yes?

ddobrev commented 7 years ago

@ShalokShalom Support for QML needs work on its own so that QML code can affect C# and vice versa (just as it is with C++ and QML). I hope to be able to complete this feature by the end of the year if we're talking about my free time.

ShalokShalom commented 7 years ago

I mean: Is it the possible to use Qt/QML with F#? Simply by calling it through C#? .Net compiles all down to CIL?

ddobrev commented 7 years ago

If Qt# worked with QML, using it with F# would've been possible too, yes.

ShalokShalom commented 7 years ago

Cuz your documentation speaks about C# only. Might be nice to change this, if it applies to all languages of the .Net platform. :+1:

This project aims to create Mono/.NET libraries that wrap Qt (https://qt-project.org/) thus enabling its usage through C#

ddobrev commented 7 years ago

@ShalokShalom your suggestion makes perfect sense. Could you please send a pull request with the change?

ShalokShalom commented 7 years ago

Already done, thanks.

ddobrev commented 7 years ago

When C# code is compiled, it turns into Microsoft's intermediate language which can be used by any .NET language. So yes, you can use Qt# with F#. You cannot use QML with F# yet for the same reason you cannot use it with C# - it's a feature not implemented yet.

ShalokShalom commented 7 years ago

Yeah, as I thought.

ShalokShalom commented 7 years ago

"For now, Qt MinGW for Windows has been the only tested version. Qt for OS X and Linux are planned."

Is this still the case?

The Atomic Game Engine is currently shifting its course, since the current previous maintainer is left. Qt/KDE is a possible solution for their UI, which makes QtSharp an essential player in this concept. :smile:

For this, support on the major platforms is important. Thanks a lot for your support. :smiley:

ddobrev commented 7 years ago

@ShalokShalom I haven't stopped working, it's just there's quite some more to do. I need to finish the templates first and then I'll spare time on proper Unix support.

ShalokShalom commented 7 years ago

Thanks a lot.

ShalokShalom commented 6 years ago

Well, I just found out, that the imperative and object oriented code in F-Sharp looks and works exactly like in C# - this means, so far as I am concerned, that you could easily port your QtSharp onto F#, so we can use inline there?

ddobrev commented 6 years ago

C# produces regular .NET code which can be consumed by any .NET language, F# included.

ShalokShalom commented 6 years ago

Yes. the thing is, that you use C# to call the Qt functions, yes?

ShalokShalom commented 6 years ago

Do you mean it makes less difference, if the file is called .cs or .fs?

Do be honest: I have less idea, how a sophisticated app will look, is there much C# specific code too write, in order to call Qt?

ddobrev commented 6 years ago

When Qt# is compiled, you just add references to it from your F# code and work. That's it.

ShalokShalom commented 6 years ago

Ok, thanks. :)

pauldotknopf commented 6 years ago

If you need Qml integration, I am working on a project that does exactly this. I'd consider it usable for production.

https://github.com/pauldotknopf/net-core-qml

ShalokShalom commented 6 years ago

Oh, interesting...

ShalokShalom commented 6 years ago

Oh, no F# API, so I prefer Fable for QML development. Thanks anyway, maybe someone writes an API sometimes.

pauldotknopf commented 6 years ago

I'm not sure what Fable is. Care to explain quickly? And how does that relate to Qt?

ShalokShalom commented 6 years ago

Fable translates F# to JavaScript and QML is practically simply a superset of JS. You can import JS files in your QML code

pauldotknopf commented 6 years ago

Sure, you can translate F# (or even C#) to JS, but you can't use .NET.

With the project I shared, you can use the full .NET runtime. I'm not sure you'd actually want to transpile Qml javascript, since they have unique (and useful) syntax for signals/etc.

ShalokShalom commented 6 years ago

With the project you shared, there is no F-Sharp implementation. I am a functional programmer by heart.

pauldotknopf commented 6 years ago

Why would you even want to use F# with Qt (which is inherently object oriented)?

Also, Qml.Net is a .NET library, which is reference-able from F# (.NET).

But again, you'd be working against the grain because Qt (and C++) is inherently/fundamentally object-oriented.

Having this "F# implementation" isn't practical, nor does it even make sense.

ShalokShalom commented 6 years ago

QML is declarative

pauldotknopf commented 6 years ago

To an extent it is, in that you can define the initial object hierarchy declaratively, but beyond that it is entirely object-oriented, not even close to functional.

Something tells me that you don't even know what you're looking for.

Good luck with that.

ShalokShalom commented 6 years ago

I can even draw QML