I'm looking forward to the release of Ubuntu Touch and thought it would be nice to contribute a small and free app that I'm also using now on my Android phone.

The free and open source app for Android is called MythMote (code.google.com/p/mythmote) and basically establishes a TCP connection to a pc running a MythTv frontend and then transfers streams of data to control it. The info on www.mythtv.org/wiki/Frontend_control_socket contains the list of supported commands that can be used.

I've managed to create the app as a Qt Widgets Application and it functions as required. So I have a myapp.pro, mainwindow.h, main.cpp, mainwindow.cpp and a mainwindow.ui file. In other words, it is a desktop app containing C++ code using the QTcpSocket Class.

What I'm struggling with at the moment is adding a QML user interface to it so that I can upload it from within the Ubuntu SDK so that it can be reviewed.

I tried to create a new Ubuntu 'App with Simple UI' and then copy paste the C++ code into an added C++ class. This does work because the Ubuntu SDK does not allow me to add a C++ class (gives a file generation failure).

I tried to create a new Ubuntu 'App with QML Extension Library'. However I cannot publish such a project as it is of the wrong kit type. Gives a 'It is not supported to create click packages for a non UbuntuSDK target.

I found a similar question on this website:

Ubuntu Touch app with c++ core and QML interface. How to create?

The top answer provided does not allow to create a Click package and thus does not allow me to publish the app.

The bottom answer points to the folowing page but I cannot get the example to work and I doubt that it will allow me to publish it:

http://forum.xda-developers.com/showthread.php?p=41115284&nocache=1

I also tried to see if QML has something similar to the QTcpSocket Class but was unable to find it.

So, I'm hoping that some of you have successfully published an app that has a C++ backend connected to a QML user interface.

Thanks!

closed as off-topic by dobey, chaskes, Panther, bain, Radu Rădeanu Jul 23 '14 at 0:04

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Bug reports and problems specific to development version of Ubuntu should be reported on Launchpad so that developers can see, track and fix these issues." – dobey, chaskes, Panther, bain, Radu Rădeanu
If this question can be reworded to fit the rules in the help center, please edit the question.

  • If you are unable to create a click package from the App with QML Extension Library template, then that is a bug in the SDK. Please report it. That is the template to use for a QML app that requires C++ back-end code. Also, make sure you are using the SDK from ppa:ubuntu-sdk-team/ppa as it has several fixes. – dobey Jul 21 '14 at 13:18
  • Thanks dobey, maybe I need to add another target as the target for an 'App with QML Extension Library template'? Such an app has 'Desktop' as the (only) target. I can imagine that the Ubuntu SDK developers assume that you then first define/create a 'UbuntuSDK target'? – user2681602 Jul 21 '14 at 13:49
  • I don't know enough about what is needed to say how to fix it. I know that all the targets under the Ubuntu project type when creating a new project, should be able to create a click package, though. If they can't, then it is a bug. – dobey Jul 21 '14 at 14:56
  • Reported as bug, see: bugs.launchpad.net/ubuntu/+source/qtcreator-plugin-ubuntu/+bug/… Is it possible to decide on whether this question is on/off-topic after receiving a response to this bug? – user2681602 Jul 23 '14 at 15:14