hey , sorry for not being clear but what i meant by hosted was like node app is not hosted anywhere . So i added node code to my qt project and in main.cpp i create a Qprocess of node and then just provide localhost url to webengineview.
this solves my purpose.
So in short what i did was :
copied node app code to my qt project.
created a process of node running the node app via Qprocess.
provided localhost url:port to webengineview and it shows the app.
// myWebView.url = "https://forum.qt.io" ( DIRECT )
//or u can call a function like this :
// setUrl(myWebView) // pass id of your webView to the function. ( FUNCTION )
@dheerendra oh, I found where was the problem, and it wasn't actually related to context menus. I use my own BrowserApp class that inherits QApplication but I found out that I inherited it the wrong way (constructor signature was wrong) and that caused some segfaults, including the one described in my question. So now I fixed that and everything works fine.
@raven-worx Thank you, it's cleart to me now. One more question - is there any possibility of grabing image of webview on android excent taking screenshot and cropping it? I know this solution is not ideal, but can't rewrite whole app and its UI logic now.
AFAIK, the QtWebView module is TP so that's the kind of thing that may have slipped through. You should take a look at the bug report system to see if there's already something about it. If not then please consider opening a new report.
I get some error info in WebPage::extension functional when continue operating under network doesn't work. I also get same info when network work. then I check the real network status in extension functional and use setNetworkAccessible(QNetworkAccessManager::NetworkAccessibility::Accessible) to set network accessibility, that's solved. I guess that will tell qt network is fine to reconnect network.
same client and server setup, but different out put sounds very strange...
I would suspect some misconfiguration on the VM webserver.
But here are some thoughts:
Some servers also behave strange when no USER-AGENT header is sent with the request
what do the IIS logs tell?
So there is someting with the QWebSocketServer I use.
The only I do is:
ws = new QWebSocketServer("", QWebSocketServer::NonSecureMode, this); ws->listen( QHostAddress::Any, 13031);
And of course connect to the newConnection() signal.
I am successfully using hxcpp in Qt application. I have not tried it on iOS yet, but android works. But I am not calling any Qt function from haxe. Instead I am building a C++ static lib from haxe containing the backend code. Then I have some C++ wrapper code that connects the backend functions with QML.
Since I can't find a solution, I'm trying to do it an other way :
Intercept ctrl or middle click before they are passed to the webview. For that, I tried to use a mouseArea, but then I'm not able the send back the events to the webview. Even with propagateComposedEvents, and even setting mouse.accepted = false. It looks like mouseArea is stealing everything, and doesn't let any click go to the underlying webview if the button is set in acceptedButtons.
Thanks so much for taking a stab at it. I tried setting the experimental.preferredMinimumContentsWidth to numbers ranging from 1 to 10000, but it doesn't seem to have any sort of affect for me.
I have tried playing around with experimental.page.scale. I found setting it to 1200/webview.width gives something similar to what I'm looking for. It prevents the page from shrinking when resizing. However, everything ends up getting very blurry, so it can't be a solution for me.
I'll try digging through the experimental settings some more. It's too bad that it isn't better documented.
It is so sad that this zooming "feature" can't be turned off. It looks like QWebView behaves properly by default, but it is a Qt widget, not a Qt Quick widget. So I won't be able to use it in my application.
If anyone out there knows how to fix this, please help!