Does QtRuby work with Qt 5?
Asked Answered
S

2

19

Everything I can find online about QtRuby uses Qt 4, but the current version of Qt is 5. Is this simply a matter of documentation not catching up with reality, where Qt 5 would work just fine with QtRuby?

If you assert that this is the case (that Qt5 is unsupported) then please backup your assertion with evidence.

Strobotron answered 11/4, 2014 at 2:18 Comment(4)
The question is not clear. Please make sure you do not only ask for a definite answer - as I currently understand it -, but also proof for that, i.e. source code level most likely.Ea
because the question is unclear. Once, you make it clearer, I will turn it back into +1.Ea
@LaszloPapp: it is normal to give evidence for any assertions made. That is not a matter of question clarity. Especially since I pointed out that the evidence seems to point to Qt5 being unsupported, it's obvious that I'd need a firm reason to conclude that, and more than just someone's supposition or assertion.Strobotron
Thanks for the edit, although I would define what "evidence" means for you. It is still unclear what you are looking for by evidence. Is my answer evident enough for you? Who knows except you ...Ea
D
10

QtRuby

Qtruby and korundum are not maintained for years now. To get a maintained version of qtruby, install qtbindings as ruby gem.

Qtbindings home page: https://github.com/ryanmelt/qtbindings/

Also see https://github.com/ryanmelt/qtbindings/issues/131 for a discussion about supporting Qt5.

Ruby-QML

Ruby-qml is a QML / Qt Quick wrapper for Ruby. It provides bindings between QML and Ruby and enables you to use Qt5 Quick-based GUI from Ruby.

The bindings provided by Ruby-QML are much leaner in comparison to QtRuby. In particular there is no direct access to the Qt classes' methods. That might first seem to be a a disadvantage when coming from QtRuby.

When learning to use use Ruby-QML, it turns out quickly that the advantages outweigh the limitations:

  • QML and JS greatly complement to describe and model the static and dynamic aspects of the UI
  • The user community of QML/JS is huge. It is so much easier to find examples or help to solve QML/JS issues, than it was within the tiny QT/Ruby community.
  • The examples on Ruby-qml are pretty much complete to demonstrate the constructs needed to get started.
  • JS may be used as flexible 'glue logic' between Ruby and Qt.
Deon answered 9/1, 2016 at 23:25 Comment(1)
Upvoted for useful information. Unfortunately I think that some of your comments will turn out to be not really viable for ruby users who want to use qt. You mention a lot of JS, but we use ruby - it feels as if we are pushed to become a second class citizen by qt and kde. Since they prioritize on Javascript - or python. That is not a viable model to pursue IMO. At this point I feel that ruby-gtk is in a much better shape than the ruby-qt ecosystem. I still remember rdale being active years ago for qtruby ... now qtruby does not even have the manpower left to transition from qt4 to qt5.Capitate
M
5

QtRuby only supports Qt 4 for the time being. Hopefully, it will change soon, but this seems to be the reality at the time of writing this.

The last release happened two and half a years ago as the time of writing this. That can be seen here:

http://rubyforge.org/projects/korundum/

As you can see, that is also a Qt 4 release as its name says: qt4-qtruby-2.2.0.

That information is also getting from their outdated KDE Wiki in here:

http://techbase.kde.org/Development/Languages/Ruby

If this is still not enough proof, you can look into the code yourself to see it is not actually binding Qt 5 classes added in that major Qt variant.

Here is a quick ls after decompressing the latest tarball:

lpapp ~/Downloads/qt4-qtruby-2.2.0/qtruby/src/lib $ ls
CMakeLists.txt  Qt  Qt.rb  Qt3.rb  Qt4.rb
Meatman answered 11/4, 2014 at 2:32 Comment(4)
You know this from experience? Or you found an authoritative source? Or you're just drawing the conclusion from the same evidence I mentioned?Strobotron
I wasn't the downvoter BTW. I just haven't upvoted yet because I'm unsure if your answer is more conclusive than what I already put in the question. Can you link to something on the mailing list? Or a specific piece of code that specifies Qt4 only? Otherwise it seems like you have a tentative conclusion, which is more or less what I already had.Strobotron
Yes, I realize you make a firm assertion (at least initially, but the word "seem" casts doubt on the initially implied certainty), but since you're not backing it up, I don't know whether it is trustworthy. If it is indeed a trustworthy answer and can be shown to be that, then I will appreciate it. But if you think I should just believe you because you say so, then I can't appreciate that attitude.Strobotron
@iconoclast: OK, I updated for you, although I really should do my work :)Ea

© 2022 - 2024 — McMap. All rights reserved.