[Interest] Help!! app qt4 upgrade to qt5 for wayland on tizen ivi, can't get the QDialog's window handle which can cast to EGLNativeWindowType

Steve (YiLiang) Zhou szhou at telecomsys.com
Thu Aug 7 09:51:31 CEST 2014


 

Dear all,

I have app which was developed by qt4, and we want to port it to tizen
ivi wayland platform, so I have to update our app to qt5.

We have a feature : drawing something based on egl on a qt window(we use
QDialog). 

Egl need a EGLSurface and a EGLDisplay to get the feature work.

EGLSurface eglCreateWindowSurface(

EGLDisplay display,

 

EGLConfig config,

 

NativeWindowType native_window,

 

EGLint const * attrib_list);

In x11 based OS like ubuntu 12.04 , we use EGL_DEFAULT_DISPLAY to get
display, the qt window's winId()   to cast to NativeWindowType

It works well on X11 based OS.

But when it comes to wayland ,it will crash at eglCreateWindowSurface, I
googled a lot ,but rarely got something useful.

Someone said that  to get eglCreateWindowSurface work on wayland ,the
native_window has to be a wl_egl_window type. 

I tried to get it like bellow:

 

QDialog *dialog = new QDialog(mainW);

dialog->setGeometry(QRect(0, 0, 720, 430));

dialog->show();

 

QPlatformNativeInterface *native =

        QGuiApplication::platformNativeInterface();

   struct wl_display *wl_dpy = (struct wl_display *)

        native->nativeResourceForWindow("display", NULL);

    struct wl_surface *surface = static_cast<struct wl_surface *>(

        native->nativeResourceForWindow("surface",
dialog->windowHandle()));

struct wl_egl_window * wl_wind = wl_egl_window_create(surface, 720,430
);

 

use the wl_wind and wl_dpy to eglCreateWindowSurface , the app didn't
crash ,but the graphics we want to draw on the window can't be seen.

 

Is there someone met this before? Can somebody give some advices? 

 

 

Thanks and Best Regards

Steve Zhou

 


CONFIDENTIALITY NOTICE: The information contained in this message may be privileged and/or confidential. If you are not the intended recipient, or responsible for delivering this message to the intended recipient, any review, forwarding, dissemination, distribution or copying of this communication or any attachment(s) is strictly prohibited. If you have received this message in error, please notify the sender immediately, and delete it and all attachments from your computer and network.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140807/76c73d8d/attachment.html>


More information about the Interest mailing list