Thursday, May 2, 2024
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 1594  / 2 Years ago, mon, october 17, 2022, 2:18:44

As I understand it, Qt - C++ and QML - or HTML5 are recommended for writing Ubuntu for Phones applications.



Also, correct me if I'm wrong, but Python is the preferred language for Ubuntu Desktop. Does this mean Python 3?



However, I can't find any documentation stating what widget toolkit, GTK+ or Qt, is preferred. Additionally, what version/generation of these is recommended? I don't know anything about recent Qt versions, but I know that GTK+2 and GTK+3 are distinct and different to code for. Am I to assume that if the preferred toolkit is GTK+, we're talking about GTK+3?



This page states that PyGTK is recommended. However, I can't tell what exactly this entails - does it mean that Python is recommended, GTK+ is recommended, or both, using PyGTK for GTK+ bindings?


More From » application-development

 Answers
6

The future:
Nothing has officially been declared. However, Canonical is pursuing a convergent strategy for its Ubuntu OS. This suggests that in the future its SDK which uses the QML language (javascript like) and Qt toolkit will end up being the preferred choices for multiplatform development. The SDK should allow one application to scale to many form factors. It's also significant to note that Mir, the new compositing window manager they are developing will have Qt bindings by default.



Currently:
As things currently stand, development on the desktop is supported by almost any language and toolkit you'd like. However, Canonical recommends GTK+ 3.0 and python2.7 for beginners (despite old docs saying pygtk, it's really pygi - also known as python with gobject introspection). The default python in Ubuntu is 2.7 not 3.0. They have created a tool for developers called "quickly" that allows you to easily design, code, package and distribute your app. By default apps depend on pygi (GTK3) and the user interface is designed with Glade.



One thing you might notice with GTK3 and pyGI is that there aren't a lot of good documentation for it yet. Here is a palce to get started, but it's missing a lot of stuff. I find that I can translate many of the C++ Gtk docs and the seed docs into the appropriate functions in python by some experimentation. Often if I can find out how to do it with the old pygtk, it's not too different in the newer pyGI. Finally, you can always post to AskUbuntu or StackOverflow for help from the community.



Finally, ubuntu has some specific APIs to interact with Unity. Check out the developer resources page for more info.


[#31999] Wednesday, October 19, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
variark

Total Points: 82
Total Questions: 114
Total Answers: 122

Location: Sweden
Member since Mon, May 8, 2023
1 Year ago
;