Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt Academy Launch in California!

    Solved Hidden webview to receive web push notifications

    QtWebEngine
    3
    5
    1066
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • HojjatJafary
      HojjatJafary last edited by

      Hi,
      Can I have a QWebEngineView with some active javascript code inside it but without actually showing the page (calling load() without calling show()).
      I need a hidden webEngineView to receive web push notifications from OneSignal.

      1 Reply Last reply Reply Quote 0
      • HojjatJafary
        HojjatJafary last edited by

        I used a QWebEnginePage instead of QWebEngineView and everything is working.

        1 Reply Last reply Reply Quote 1
        • I
          Izba last edited by Izba

          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

          1 Reply Last reply Reply Quote 1
          • HojjatJafary
            HojjatJafary last edited by

            Thank you @Izba ,
            I will try this solution.

            1 Reply Last reply Reply Quote 0
            • HojjatJafary
              HojjatJafary last edited by

              I used a QWebEnginePage instead of QWebEngineView and everything is working.

              1 Reply Last reply Reply Quote 1
              • S
                sanit.peng last edited by

                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

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post