mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
delegate external links in preview
This commit is contained in:
parent
dbfcb44ea7
commit
614793d4d4
1 changed files with 3 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
|||
from PyQt4.QtGui import *
|
||||
from PyQt4.QtCore import *
|
||||
from PyQt4.QtSvg import *
|
||||
from PyQt4.QtWebKit import QWebPage
|
||||
import re, os, sys, tempfile, urllib2, ctypes
|
||||
from anki.utils import stripHTML, tidyHTML, canonifyTags
|
||||
from anki.sound import playFromText
|
||||
|
@ -1079,6 +1080,8 @@ class PreviewDialog(QDialog):
|
|||
self.currentCard = 0
|
||||
self.dialog = ankiqt.forms.previewcards.Ui_Dialog()
|
||||
self.dialog.setupUi(self)
|
||||
self.dialog.webView.page().setLinkDelegationPolicy(
|
||||
QWebPage.DelegateExternalLinks)
|
||||
self.dialog.comboBox.addItems(QStringList(
|
||||
[c.cardModel.name for c in self.cards]))
|
||||
self.connect(self.dialog.comboBox, SIGNAL("activated(int)"),
|
||||
|
|
Loading…
Reference in a new issue