How to get HTML code from selected text from Right Click Menu (Context Menu)?
How can I get data from selected text from Right Click Menu (Context Menu)?
How can I access that part of web page?
In QWebView, ContextMenuEvent, how do I get selected text from QWebView via Rt Click
e.g, when we select “http://www.google.com” on QWebView contents, Rt Click on them -> Menu Appears -> “Chang with my Home Page” Click -> “http://www.google.com” on QWebView change to my home page address.
The interchange may be the other text or other words..
It like when we select URL address on browser, context Menu add option of “Open this in new Tab” although it’s not a hyperlink…
The problem really is that selected text can span more than one element (or just parts of elements). WebKit is not MS Word. It is not that simple. You can play with WebAction and isEditable, but that’s more of a dirty hack than anything else. Maybe you can tell us more about the use case and we can guide you to a more appropriate solution.
I’m trying to make a browser similar to other browser.
But like not other browser, it can convert to some specific Unicode words replace on incoming web page if loaded page has predefined such unicode character. I post previously for such answer How to get & change HTML data [developer.qt.nokia.com]
So, I decided to convert the selected words upon Rt click & convert on request & show the converted words on QWebView in place of previously selected words…
That’s all what I want. Sorry for my English…