Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. Hidden webview to receive web push notifications
Forum Updated to NodeBB v4.3 + New Features

Hidden webview to receive web push notifications

Scheduled Pinned Locked Moved Solved QtWebEngine
5 Posts 3 Posters 1.5k Views
  • 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.
  • HojjatJafaryH Offline
    HojjatJafaryH Offline
    HojjatJafary
    wrote on last edited by
    #1

    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
    0
    • HojjatJafaryH Offline
      HojjatJafaryH Offline
      HojjatJafary
      wrote on last edited by
      #4

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

      1 Reply Last reply
      1
      • I Offline
        I Offline
        Izba
        wrote on last edited by Izba
        #2

        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
        1
        • HojjatJafaryH Offline
          HojjatJafaryH Offline
          HojjatJafary
          wrote on last edited by
          #3

          Thank you @Izba ,
          I will try this solution.

          1 Reply Last reply
          0
          • HojjatJafaryH Offline
            HojjatJafaryH Offline
            HojjatJafary
            wrote on last edited by
            #4

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

            1 Reply Last reply
            1
            • S Offline
              S Offline
              sanit.peng
              wrote on last edited by
              #5

              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
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved