QT on Ubuntu for controlling IoT devices, Arduino, etc. - Page 1
Forum section: electronics / projects

author: edy
author_rank: Super Contributor
timestamp: December 08, 2016, 03:18:47 pm
content: Hi,I'm just beginning to delve into QT and setting up a coding environment on an Ubuntu system. I know C/C++ and I've used Visual Studio before with a Marmalade SDK for making a game. Otherwise I primarily worked in making web-apps/mobile-apps which are basically HTML5/Javascript/CSS-wrapped up in an app package. The closest I got is QML in Momentics IDE to make a BlackBerry app to make a nice native smooth interface for my app, but for webapps I have been using jQuery for all of the controls/UI.So my question is to anyone with experience in this, would this be a good place to start on Ubuntu if I want to make apps? I have downloaded QTCreator and started playing around with it. I'd like to eventually make an interface for an IoT device, maybe to allow communication with an Arduino plugged in via USB. Does the QT IDE/environment/UI bode well for even making mobile apps, apps for different systems (like Windows), and so on? Can I do all of this on my Ubuntu system?From what I've seen so far, it looks like a very versatile environment and will allow several languages for coding as well, and allow builds across multiple-platforms. I just wanted some advice as to whether it is a good place to start.... or is there some other IDE or Programming environment/UI that would be better for a "beginner" to start making general-purpose apps and learning.[EDIT: I just found this.... looks like it's possible:http://www.instructables.com/id/Control-your-arduino-from-your-PC-with-the-Qt-Gui/... So controlling the Arduino needs a serialport library, and likely for an IoT device will need to figure out how to send commands over network. Also should be able to take inputs from the Arduino and display them, like whether a button is pressed or not and a graph showing voltage input on a pin (like a dimmer/pot).]

author: dferyance
author_rank: Regular Contributor
timestamp: December 09, 2016, 06:03:46 pm
content: I currently work in Qt and QML at my job so I am pretty familiar with the environment. Like anything, the answer is always "it depends". That said, it has worked pretty well for the projects I have been on.Qt is kinda going through a split right now. Most of Qt, at least what people think of Qt are the Qt Widgets. While QML is a new GUI design system that has a very different design and programming model. The sample you link to is using QML. I really like QML and the way you design UIs is similar to how you would in the web. However, as it is newer than the widgets, it tends to be more buggy.Qt is great about cross platform and QML is designed to work on mobile as well. It doesn't magically "just-work" but frankly no cross-platform system does even if they advertise to do so.One nice thing that has been added to Qt is having a BLE Api. I know you are looking at USB/serial but I was very happy to see a BLE api. Before this, I was trying to call the command-line tools from my C++ code and that was a real pain.So, like many tools it is a fine system. Since you are used to web programming, there are a lot of differences when you have to deal with applications that run on different system configurations but it also gives you a lot of power and flexibility too.

author: Karel
author_rank: Super Contributor
timestamp: December 09, 2016, 06:49:43 pm
content: I use Qt a lot, mainly widgets.Qt is not just a graphics library, it's a complete C++ framework with classes for the serial port and bluetooth.QML I detest, imho it was a crazy decision to use a javascript language in a C++ framework...