[Okular-devel] demo epub - using webkit

Albert Astals Cid aacid at kde.org
Tue May 7 22:05:02 UTC 2013


El Diumenge, 5 de maig de 2013, a les 01:46:34, Jaydeep Solanki va escriure:
> Hello,
> I have created a small app that opens epub files and renders them using
> webkit.
> It has a lot of bugs, but I just want to verify that the approach that I'm
> using is appropriate or not.

Well, you are not implementing the okular generator API at the moment, that's 
something you should always keep in mind, i.e. you can't use a webview to 
display stuff to the user.

Cheers,
  Albert

> 
> To load the resources in webview, I use a subclass of
> QNetworkAccessManager, that gets the resources using libepub and passes it
> as a networkreply. To make this work, I just had to prepend the src
> attribute of images (<img>) with "http://" in the html, so that it asks the
> assigned networkmanager to download it.
> 
> here's the github link <https://github.com/jaydeep17/Okular_Epub>.
> 
> Cheers,
> Jaydeep


More information about the Okular-devel mailing list