mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Also use QWebView to display comments in book details dialog
This commit is contained in:
parent
9528d90f59
commit
ed1a4cc460
@ -108,7 +108,7 @@ class BookInfo(QDialog, Ui_BookInfo):
|
|||||||
lines = comments.splitlines()
|
lines = comments.splitlines()
|
||||||
lines = [x if x.strip() else '<br><br>' for x in lines]
|
lines = [x if x.strip() else '<br><br>' for x in lines]
|
||||||
comments = '\n'.join(lines)
|
comments = '\n'.join(lines)
|
||||||
self.comments.setText('<div>%s</div>' % comments)
|
self.comments.setHtml('<div>%s</div>' % comments)
|
||||||
cdata = info.pop('cover', '')
|
cdata = info.pop('cover', '')
|
||||||
self.cover_pixmap = QPixmap.fromImage(cdata)
|
self.cover_pixmap = QPixmap.fromImage(cdata)
|
||||||
self.resize_cover()
|
self.resize_cover()
|
||||||
|
@ -49,7 +49,19 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout">
|
<layout class="QGridLayout">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QTextBrowser" name="comments"/>
|
<widget class="QWebView" name="comments">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>350</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="url">
|
||||||
|
<url>
|
||||||
|
<string>about:blank</string>
|
||||||
|
</url>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
@ -91,6 +103,13 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>QWebView</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header>QtWebKit/QWebView</header>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../../../../resources/images.qrc"/>
|
<include location="../../../../resources/images.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user