Hi,

On 04 Dec 2013, at 20:18, joao morgado 
<joaodeusmorg...@yahoo.com<mailto:joaodeusmorg...@yahoo.com>> wrote:
@: Wim de Vries.
I share your frustation about OpenGL with QWindow, and I'm also frustated with 
Qt widgets.
I have a very nice app in OVI, symbian, with QWidgets and OpenGL, I'll have to 
do a complete redesign, since widgets are black listed.

The reason for the blacklist is twofold:
1) we do not (and have not) done any work on QWidget-using applications on 
Sailfish, either in terms of working at all/working correctly, let alone 
working performantly - and as we don’t have infinite resources, we have to 
choose where to focus, and that isn’t on widget-using applications
2) they will not work performantly at all, due to being stuck with the software 
rendering stack (we’re talking something well under the display refresh rate on 
an un-loaded device)

Separately from the problem of actually working, and working well, any use of 
QtWidgets also imposes some pretty nasty resource penalties on your application 
(mostly in terms of startup, but also resource usage) as it’s a pretty massive 
library.

Generally speaking - they just aren’t very mobile-friendly.

That example of QWindow with OpenGL, to me, it's an over complicated mess, 
luckly I managed to port my opengl code to QWindow but took me quite a while to 
do it. To me, there is a better example here 
https://github.com/advancingu/Qt5OpenGL

An example rather depends on what you want to do. Either you’re:
1) using QML writing C++ items to integrate into the scene graph (see 
http://qt-project.org/doc/qt-5.0/qtquick/qquickitem.html for the base class) - 
this also means you’ll be able to use Silica in your application
2) using C++, instantiating a QWindow, and doing all your rendering by yourself 
(ideally using OpenGL ES) - something like 
http://qt-project.org/doc/qt-5.0/qtgui/openglwindow.html
3) other, as-yet-to-be-finalised routes like doing *everything* yourself, using 
SDL, etc.

So it seems that only QML apps are supported, but I have no clue how to add a 
QWindow in a QML app. There's an example in QtCreator "Scene Graph - OpenGL 
under QML" but they use QQuickItem,
for OpenGL, so I still don't have a clue how to use OpenGL in a QML app.

Your QML application has a C++ entry point (though if you’re using something 
like qmlscene… you’ll need to create such an entry point yourself) with your 
‘main’ function. You can create a QWindow in there, and show it. You can hook 
into QML using Q_INVOKABLE methods to show it based on a clicked action on a 
Silica button, etc, etc, etc.

I’d need more information to be able to really provide useful help here :)

Regards
João de Deus

BR,
Robin
_______________________________________________
SailfishOS.org Devel mailing list

Reply via email to