webosose / build-webos

webOS OSE build layer
668 stars 125 forks source link

Develop Native apps in Qt5 #2

Open pushpendrak opened 6 years ago

pushpendrak commented 6 years ago

Can someone guide, how to develop GUI application using Qt as WebOS has Qt implementation inside. it will be very nice as it will open the way to develop lots of Apps in C++. like Sailfish OS and Ubuntu etc.

sunghyuncho commented 6 years ago

for now, development guide for GUI application using Qt is not available, however, we will take that into consideration in our documentation plan for the next update.

Herrie82 commented 6 years ago

@pushpendrak On LuneOS based on Open webOS (HP's open sourced version, not too different from LG's version) we developed a number of Qt Apps like:

https://github.com/webos-ports/org.webosports.app.firstuse https://github.com/webos-ports/org.webosports.app.browser https://github.com/webos-ports/org.webosports.app.camera https://github.com/webos-ports/org.webosports.app.phone https://github.com/webos-ports/org.webosports.app.settings/tree/qml-based

A project we reused from SFOS/Mer was Fingerterm: https://github.com/webOS-ports/meta-webos-ports/blob/pyro/meta-luneos/recipes-luneos/apps/fingerterm.bb

Recipes for our QML apps can be found at: https://github.com/webOS-ports/meta-webos-ports/tree/pyro/meta-luneos/recipes-luneos/apps

This should in general work on webOS OSE as well, however on LuneOS we're already on Qt 5.9.4. So there might be some new features that aren't in Qt 5.6 used by webOS OSE.

Unfortunately we don't really have a guide for it, but the recipes + code should give you some ideas :)

mcirsta commented 6 years ago

I do understand that web tech like HTML5 and CSS are recommended for development but please do consider offering QT and native C++ APIs. Google did offer the NDK for Android and it's how they got a lot of apps that were just not possible otherwise, including games.

sparkleholic commented 6 years ago

@mcirsta Actually there is no restrictions for the builtin apps, probably you could get some hints that webOS already use 'QT/QML' inside if you take a look at the webOS project in the github.

If you just want to test an qml app quickly, you can refer to this bare-eos. There is two options to include apps, including it on the image, or installing it from outside via appinstalld

If you want to test qml apps installed by appinstalld, it needs a simple fix. You can refer to this PR.

And for developing the native apps, the simplest way I think is to use cross toolchain, which you can gain from the following command.

bitbake -c populate_sdk webos-image-devel