[Qtwebengine] Sharing data between QWebEngineProfiles

Allan Sandfeld Jensen kde at carewolf.com
Thu Aug 20 13:37:37 CEST 2015


On Thursday 20 August 2015, Florian Bruhin wrote:
> Hi,
> 
> I (from qutebrowser[1]) and Emdek (from Otter Browser[2]) discussed
> what's still missing for us from QtWebEngine, and one point which came
> up and wasn't discussed already is sharing data between multiple
> QWebEngineProfiles.
> 
> Our use-case is to have per-domain and possibly per-tab settings, e.g.
> the user want to configure the user-agent differently based on the
> page they're visiting.
> 
> This means you'll end up with having a new QWebEngineProfile for every
> tab - however, that also means every tab will have its own persistent
> storage, cookie store, and cache - right?
> 
> Is it possible/planned to share data between QWebEngineProfiles so one
> can implement this kind of thing?
> 
> I guess one possibility is to use the same storageName for all of them
> - but will that work?
> 
No, that would not be how profiles are supposed to be used. If you need 
different user-agent string per page, we should probably make a separate API 
for that (in fact the Chromium API we use already have separate mechanisms for 
overriding user-agent on a per page basis.

`Allan




More information about the QtWebEngine mailing list