Hidden webview to receive web push notifications
-
Hi,
Can I have aQWebEngineView
with some active javascript code inside it but without actually showing the page (callingload()
without callingshow()
).
I need a hidden webEngineView to receive web push notifications from OneSignal. -
I used a
QWebEnginePage
instead ofQWebEngineView
and everything is working. -
Hi @HojjatJafary,
I think you could just set the width and height to 0 so it doesn't show anywhere.
At least in QtQuick application the WebEngineView stay's hidden, but javascript is still running in the background.
EDIT: But i still think you have to call show();
Regards,
Izba -
Thank you @Izba ,
I will try this solution. -
I used a
QWebEnginePage
instead ofQWebEngineView
and everything is working. -
hi, i see you use QwebEngineView to receive the OneSingal webpush. I thought the FCM (cloud messaging will be same in webpush). Did you test this ? thank you