February 9, 2012

Ashish Mittal Ashish Mittal
Hobby Entomologist
109 posts

How to write some text on QWebView

 

Hi,

I am using QWEBVIEW class to display adobe plugins. I would like to display some text on this QWebview window.
I tried to use QLabel and making this as a child of QWebView. My text is visible initially but as soon as QWebView starts drawing
my text is getting overlapped by webview contents. I tried to override paintEvent() as well, but same behavior.

5 replies

February 9, 2012

AcerExtensa AcerExtensa
Hobby Entomologist
177 posts

I’m not sure if I right, but plugins do they drawing by themself…

 Signature 

God is Real unless explicitly declared as Integer.

February 10, 2012

Ashish Mittal Ashish Mittal
Hobby Entomologist
109 posts

There are two types of flash plugins.
1) Windowless
2) Windowed

I am able to display my QLabel on windowless kind of plugin , but in case of windowed I am not able to.

Actually In case of windoless plugin Adobe dll takes the dc of the QWebView but in case of Windowed it takes the HWND of the QWebView. Might be by taking QWebView it is having full control on drwaing.

Anyways thanks for your guess….
Any workaround to get rid out of this problem.?????????

February 10, 2012

AcerExtensa AcerExtensa
Hobby Entomologist
177 posts

Some time ago I’ve had similar problem on Windows Mobile, the only way to get rid of it was just to direct draw on window with 24fps… absolutly not nice… another way was to use DirectX.

Have you tried QGraphicsWebView?

 Signature 

God is Real unless explicitly declared as Integer.

February 10, 2012

Ashish Mittal Ashish Mittal
Hobby Entomologist
109 posts

Would you please throw some more light on how to draw using 24fps on QwebView window(I want the same code to run in Linux as well). I have seen the docs for QGraphicsWebview but not getting how it can be helpful in my problem scenario.

February 12, 2012

AcerExtensa AcerExtensa
Hobby Entomologist
177 posts

Start timer for 40ms, in timeout slot get DC from MainWindow, get rect of flash widget and draw what you need… It was working for me under WindowsMobile, should work in Windows to… on linux you can also draw directly in frame buffer…

Havn’t used QGraphicsWebview, but “Graphics” do they drawing in other way as simple QWidgets?! or not… it’s just a guess…

 Signature 

God is Real unless explicitly declared as Integer.

 
  ‹‹ [SOLVED]Completing forms and submit buttons      QtWebKit mixed https / http pages ››

You must log in to post a reply. Not a member yet? Register here!