本文整理汇总了Python中PyQt5.QtWebKit.QWebSettings.webGraphic方法的典型用法代码示例。如果您正苦于以下问题:Python QWebSettings.webGraphic方法的具体用法?Python QWebSettings.webGraphic怎么用?Python QWebSettings.webGraphic使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.QtWebKit.QWebSettings
的用法示例。
在下文中一共展示了QWebSettings.webGraphic方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: addFeed
# 需要导入模块: from PyQt5.QtWebKit import QWebSettings [as 别名]
# 或者: from PyQt5.QtWebKit.QWebSettings import webGraphic [as 别名]
def addFeed(self, urlString, title, icon):
"""
Public method to add a feed.
@param urlString URL of the feed (string)
@param title title of the feed (string)
@param icon icon for the feed (QIcon)
@return flag indicating a successful addition of the feed (boolean)
"""
if urlString == "":
return False
if not self.__loaded:
self.__load()
# step 1: check, if feed was already added
for feed in self.__feeds:
if feed[0] == urlString:
return False
# step 2: add the feed
if icon.isNull() or \
icon == QIcon(QWebSettings.webGraphic(
QWebSettings.DefaultFrameIconGraphic)):
icon = UI.PixmapCache.getIcon("rss16.png")
feed = (urlString, title, icon)
self.__feeds.append(feed)
self.__addFeedItem(feed)
self.__save()
return True