本文整理汇总了Python中PyQt4.QtWebKit.QWebInspector.setGeometry方法的典型用法代码示例。如果您正苦于以下问题:Python QWebInspector.setGeometry方法的具体用法?Python QWebInspector.setGeometry怎么用?Python QWebInspector.setGeometry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.QtWebKit.QWebInspector
的用法示例。
在下文中一共展示了QWebInspector.setGeometry方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Web_Page
# 需要导入模块: from PyQt4.QtWebKit import QWebInspector [as 别名]
# 或者: from PyQt4.QtWebKit.QWebInspector import setGeometry [as 别名]
class Web_Page( QWebPage ):
# =======================================================================
def __init__(self, parent, parentMain, UID):
# -------------------------------------------------------------------
QWebPage.__init__(self, parent);
# -------------------------------------------------------------------
self.PARENT = parentMain;
self.UID = UID;
self.PARENT_TAB = parent;
self.DEBUG = False;
self.LOG_TAG = str(self.__class__.__name__).upper();
# -------------------------------------------------------------------
self.L_BTN_CLICK = False;
self.M_BTN_CLICK = False;
self.R_BTN_CLICK = False;
# -------------------------------------------------------------------
self.PROGRESS_BAR = None;
self.PROGRESS_BAR_PR = float( self.PARENT.WIDTH / 100);
self.PROGRESS_BAR_W = 0;
# -------------------------------------------------------------------
# SEARCH_INPUT
self.SEARCH_INPUT = QLineEdit("", self.PARENT);
self.SEARCH_INPUT.setGeometry(0, 615, 400, 30);
self.SEARCH_INPUT.setStyleSheet("QLineEdit{ background-color: rgba(0,0,0, 180); font-size: 12px; font-family: monospace; color: #fff; padding-left: 10px; border-style: none;}");
self.connect( self.SEARCH_INPUT, SIGNAL('textChanged(const QString)') , self.FIND_ON_PAGE );
self.connect( self.SEARCH_INPUT, SIGNAL('returnPressed()') , self.FIND_ON_PAGE );
#self.SEARCH_INPUT.setReadOnly( True );
self.SEARCH_INPUT_IS_OPEN = False;
self.SEARCH_INPUT.hide();
# -------------------------------------------------------------------
self.AGENTS = [
# Chrome 41.0.2228.0
"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36",
# Chrome 41.0.2227.1
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.1 Safari/537.36",
# Chrome 41.0.2227.0
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.0 Safari/537.36",
"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.0 Safari/537.36",
# Chrome 41.0.2226.0
"Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2226.0 Safari/537.36",
# Chrome 41.0.2225.0
"Mozilla/5.0 (Windows NT 6.4; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2225.0 Safari/537.36",
"Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2225.0 Safari/537.36",
# Chrome 41.0.2224.3
"Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2224.3 Safari/537.36",
# Chrome 40.0.2214.93
"Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36",
# Chrome 37.0.2062.124
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36",
# Chrome 37.0.2049.0
"Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2049.0 Safari/537.36",
"Mozilla/5.0 (Windows NT 4.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2049.0 Safari/537.36",
# Chrome 36.0.1985.67
"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.67 Safari/537.36",
"Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.67 Safari/537.36",
# Chrome 36.0.1985.125
"Mozilla/5.0 (X11; OpenBSD i386) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36",
# Chrome 36.0.1944.0
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1944.0 Safari/537.36",
# Chrome 35.0.3319.102
"Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.3319.102 Safari/537.36",
# Chrome 35.0.2309.372
"Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.2309.372 Safari/537.36",
# Chrome 35.0.2117.157
"Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.2117.157 Safari/537.36",
# Chrome 35.0.1916.47
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.47 Safari/537.36",
# Chrome 34.0.1866.237
"Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1866.237 Safari/537.36",
# Chrome 34.0.1847.137
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.137 Safari/4E423F",
# Chrome 34.0.1847.116
"Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36",
"Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10",
];
# -------------------------------------------------------------------
self.USER_AGENT = self.AGENTS[0];
self.HEADERS = {
"User-Agent" : "[USER-AGENT]",
"Accept" : "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
#"Accept-Language" : "en-US,en;q=0.5",
#"Referer" : "https://btc-e.com/",
#"Connection" : "keep-alive",
#"Cache-Control" : "max-age=0",
#.........这里部分代码省略.........