tallforasmurf / PPQT

A post-processing tool for PGDP written in Python, PyQt4, and Qt
GNU General Public License v3.0
4 stars 2 forks source link

annoying problem with QWebView/QWebHistory #177

Closed tallforasmurf closed 10 years ago

tallforasmurf commented 10 years ago

In both the PVW pane and the Help, if the user:

viewer goes back to target A. User must key ctl-b a second time to get back to original. This continues: link to C, back to A. Link to D, back to A. It also persists over a Refresh which calls history.clear(). Once that item A has gotten into the QWebHistory list there's no getting it out.

I speculate this is a bug in QWebPage/QWebHistory triggered by the fact that we always start, not with setUrl, but with setHtml. I speculate that if we did setUrl, that would initialize the QWebHistory with the first URL, but that doing setHtml does not put anything in the history.

Rather than filing a bug, I think just take history.currentItemIndex()<= 1 as a sign that there is no history -- instead of testing history.canGoBack().