Qt Project

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Qt Project

Post by copterrichie »

Anyone here interested in using QC Creator/Project to create a multi-platform GUI for the MultiWii?

Qt is a cross-platform application and UI framework for developers using C++ or QML, a CSS & JavaScript like language. Qt Creator is the supporting Qt IDE.

Qt, Qt Quick and the supporting tools are developed as an open source project governed by an inclusive meritocratic model. Qt can be used under open source (LGPL v2.1) or commercial terms.


http://qt-project.org/

trello
Posts: 19
Joined: Wed Apr 10, 2013 1:04 pm

Re: Qt Project

Post by trello »

I would be interested in helping out with a crossplattform gui, although i never really worked with qt. Have you considered using kivy and python? Would support android and iOS, although i don't know how stable it is.

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Qt Project

Post by timecop »

> python
No.

Sebbi
Posts: 478
Joined: Sun Jul 08, 2012 1:08 am
Location: Germany
Contact:

Re: Qt Project

Post by Sebbi »

Isn't the current GUI multi-platform? What kind of other platforms do you want to support with a QT-Gui?

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Qt Project

Post by copterrichie »


copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Qt Project

Post by copterrichie »

Sebbi wrote:Isn't the current GUI multi-platform? What kind of other platforms do you want to support with a QT-Gui?


To my present understand, QT can build for the Raspberry, Android, Window Mobile as well as Desktop PC, Mac and Linux.

trello
Posts: 19
Joined: Wed Apr 10, 2013 1:04 pm

Re: Qt Project

Post by trello »

Do you want to focus on specific parts or do you want to create a multipurpose gui? I think the configuration part is pretty well made with MultiWiiConf but i realtime flight and sensor application would be great, especially with nav waypoints coming. Thats the reason i was thinking something like kivy would be great because its focused on graphics instead of classical gui stuff.

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Qt Project

Post by copterrichie »

trello wrote:Do you want to focus on specific parts or do you want to create a multipurpose gui? I think the configuration part is pretty well made with MultiWiiConf but i realtime flight and sensor application would be great, especially with nav waypoints coming. Thats the reason i was thinking something like kivy would be great because its focused on graphics instead of classical gui stuff.


The current MultiWiiConf is good if the platform used is Windows, it runs on Mac and Linux but there are minor issues. I ported it over to Android, and it is OK but not good and it will totally not run on a Raspberry PI. TOOOOOO Freaking Slow because of Java. Personally, I would like to see a total rewrite using qgroundcontrol as a model or even forking a version of it for the Wii. I am presently in a learning curve with QT and can not make the modifications myself at present but I hope to be able soon if not for the community, then for myself. I want to build a ground station based upon the Raspberry PI.

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Qt Project

Post by timecop »

But it uses python, a write-only scripting language which almost noone can or wants to understand. Wouldn't it make more sense to use a language that more developers can contribute to?

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Qt Project

Post by copterrichie »

timecop wrote:But it uses python, a write-only scripting language which almost noone can or wants to understand. Wouldn't it make more sense to use a language that more developers can contribute to?


I am not aware that QT 5.1 uses python, maybe previous versions did. QT 5.1 creator is an IDE.

trello
Posts: 19
Joined: Wed Apr 10, 2013 1:04 pm

Re: Qt Project

Post by trello »

I agree with you, but i'm pretty sure the main reason its slow is not java but these two things:

-Serial communication loop which runs several times a second
-Drawing the sensor chart and data

Sure, you wont have that much overhead if you're not using Java or .NET but QT4 is primarily designed for classic gui application which usually don't include many graphical elements with a high refresh rate.

For this kind of stuff it would be best bet to use opengl which can be integratedin a qt4 application. But you would still have to separate the display stuff from the serial communication data or at least make it non-blocking.

A modular approach is also important of you want to go multiplattform because it might be necessary to use a completely different libraries for lowlevel stuff like serial communication.

Regarding python/c++:

QT is a gui framework, it has bindings for many languages. It seems most people use c++ but there is also a considerable amount of projects using pyqt. Programming languages are a matter of taste, but you will have a hard time finding people that think writing code in c++ is more fun than python.

-> The overhead of learning qt would be much higher than switching from c++ to java or python, because if you use an extensive framework much of the code will be written with the specifics of the framework in mind.

Look at the code for a qt application with c++ or python, you'll see what i mean:

https://github.com/void-main/CuteEditor ... window.cpp
https://github.com/firefoxmmx2/pyqt_tes ... Example.py
Last edited by trello on Tue Sep 10, 2013 1:17 pm, edited 1 time in total.

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Qt Project

Post by copterrichie »

Agreed, Modular is the way to go because not everyone will require all and each platform requires a different screen size. I would suggest using QT5 verse QT4.

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Qt Project

Post by timecop »

trello wrote:but you will have a hard time finding people that think writing code in c++ is more fun than python.

LOL

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Qt Project

Post by copterrichie »

Seriously, I am going to give it my best shot, what else do I have to do? Troll this site? LOL

Will update as we progress.

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Qt Project

Post by copterrichie »

P.S. I feel having separate screens for each function is the best way to address multi-platforms. Everything does not have to be located on one screen as presently done.

trello
Posts: 19
Joined: Wed Apr 10, 2013 1:04 pm

Re: Qt Project

Post by trello »

Good luck! Maybe you should also look into qtquick2, looks nice.

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Qt Project

Post by copterrichie »

trello wrote:Good luck! Maybe you should also look into qtquick2, looks nice.


Thank you, I will.

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Qt Project

Post by copterrichie »

Oh my G.., someone has already done most of the work: http://fpv-community.de/showthread.php? ... spberry-PI

gcain
Posts: 2
Joined: Thu Sep 12, 2013 7:44 am

Re: Qt Project

Post by gcain »

copterrichie wrote:Will update as we progress.



Let me know if you get stuck.
I'm quite familiar with Qt (use it daily) and I set up comms between MultiWii and a Qt project only a month or two back. Unfortunately work got in the way and I had to shelve the project.

Anyway, if you need a kick-start I can send you the project I started.

Cheers,
G.

trello
Posts: 19
Joined: Wed Apr 10, 2013 1:04 pm

Re: Qt Project

Post by trello »

copterrichie wrote:Oh my G.., someone has already done most of the work: http://fpv-community.de/showthread.php? ... spberry-PI


Looks awesome!

Did you use your pi on the field already? How did you power it? A 5v BEC from the 12v video circuit should work on the usb port i think. The great thing is that the video out can be easily plugged into fpv monitors.

Maybe we can help improve the multiwii support for this project instead of starting a new one.

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Qt Project

Post by copterrichie »

trello wrote:
copterrichie wrote:Oh my G.., someone has already done most of the work: http://fpv-community.de/showthread.php? ... spberry-PI


Looks awesome!

Did you use your pi on the field already? How did you power it? A 5v BEC from the 12v video circuit should work on the usb port i think. The great thing is that the video out can be easily plugged into fpv monitors.

Maybe we can help improve the multiwii support for this project instead of starting a new one.



After playing with the above for a number of hours, there are a number of Prerequisites required to get it to compile. I believe building a new GUI with QT is best. I have not asked the creator of MultiGCS für Linux und Raspberry-PI if he would be interested in porting it over to QT but I will, hopefully sometime today.

As for powering the PI, I plan to use a DC-DC step-down converter or a BEC.

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Qt Project

Post by copterrichie »

gcain wrote:
copterrichie wrote:Will update as we progress.



Let me know if you get stuck.
I'm quite familiar with Qt (use it daily) and I set up comms between MultiWii and a Qt project only a month or two back. Unfortunately work got in the way and I had to shelve the project.

Anyway, if you need a kick-start I can send you the project I started.

Cheers,
G.


Yes, Yes and another Yes, I can use all the help I can get. I just completed installing QT on my newly created Debian Linux box and have all of the required Libraries installed. I previous installed it on my Mac and for some reason, all of the required libraries where there already.

If you don't mind, I will follow up with a PM.

Thank you.

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Qt Project

Post by copterrichie »

Also for powering the PI, I am strongly considering purchasing of one of these: 4 USB DC12V to 5V 5A Car Charger Power Supply Step-Down Module for Phone MP5 GPS

http://www.ebay.com/itm/171100191281?ss ... 1438.l2649

gcain
Posts: 2
Joined: Thu Sep 12, 2013 7:44 am

Re: Qt Project

Post by gcain »

copterrichie wrote:
Yes, Yes and another Yes, I can use all the help I can get. I just completed installing QT on my newly created Debian Linux box and have all of the required Libraries installed. I previous installed it on my Mac and for some reason, all of the required libraries where there already.

If you don't mind, I will follow up with a PM.

Thank you.



As requested.

1. It was written on OS X.
2. It uses QSerialPort which I think only merged in Qt 5.x
3. It's pretty rough as was simply a proof of concept.

If you get organised let me know and I'll contribute.

Cheeers.
Attachments
FC_Serial.zip
(114.22 KiB) Downloaded 120 times

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Qt Project

Post by copterrichie »

gcain wrote:
As requested.

1. It was written on OS X.
2. It uses QSerialPort which I think only merged in Qt 5.x
3. It's pretty rough as was simply a proof of concept.

If you get organised let me know and I'll contribute.

Cheeers.



AWESOME!!! Just what I need! Once we get a little farther along, I will post what I have on GIT and link to it here.

Thank you!!

Post Reply