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. iconUrlChanged signal not received with custom url scheme
Forum Updated to NodeBB v4.3 + New Features

iconUrlChanged signal not received with custom url scheme

Scheduled Pinned Locked Moved Unsolved QtWebEngine
2 Posts 2 Posters 753 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.
  • M Offline
    M Offline
    mpergand
    wrote on last edited by mpergand
    #1

    I’am using a custom scheme for a RSS reader
    The generated html includes a favicon:

     <link rel="icon" href="favicon.png" sizes="16x16" type="image/png">
    

    In Qt 5.6, I receive the iconUrlChanged able me to set the appropriate icon in the url field of the toolbar
    In Qt 5.7.1, it doesn’t work anymore, neither iconUrlChanged nor iconChanged are received.

    Putting some logs shows that the request is correct in the schemeHandler:

    RSS requestStarted: QUrl("rss:/favicon.png")
    icon QUrl("rss:/favicon.png") 
    data RSS "image/png" 3806 bytes
    

    I expect thereafter to receive the icon in my iconChanged slot, but nothing happens.

    On the other hand, i’m questioning myself about the new AutoLoadIconsForPage setting in Qt 5.7
    Since Qt 5.5, i’m implementing my own favicon management (loading/caching …), therefore , enable the AutoLoadIconsForPage setting seems unnecessary as it will doing the same job double time.
    But if i disable this option, again i don’t receive the iconUrlChanged, so no icon is loaded at all.

    Is this the correct behavior ?
    and if so what i’m doing wrong ?

    Thanks in advance

    1 Reply Last reply
    0
    • B Offline
      B Offline
      Bui Trung
      wrote on last edited by
      #2

      I think you can solve your problem by overriding this function:
      http://doc.qt.io/qt-5/qwebenginepage.html#acceptNavigationRequest
      You have to check the url scheme that match your custom url sheme then do emit iconUrlChanged signal, other cases, call to this parent method to execute th request.

      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