-
Notifications
You must be signed in to change notification settings - Fork 0
/
qtDocFinder.py
23 lines (20 loc) · 962 Bytes
/
qtDocFinder.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import sublime
import sublime_plugin
import webbrowser
class qtdocfinderCommand(sublime_plugin.TextCommand):
def run(self, edit, index):
sel = self.view.sel()
if len(sel):
text = self.view.substr(sel[0])
text = text.strip()
print ("caca culo")
if index == 0:
webbrowser.open("http://doc.qt.io/qt-5/{}.html".format(text))
if index == 1:
webbrowser.open("http://doc.qt.io/qt-4.8/{}.html".format(text))
if index == 2:
webbrowser.open("http://pyside.github.io/docs/pyside/search.html?q={}".format(text))
if index == 3:
webbrowser.open("http://pyqt.sourceforge.net/Docs/PyQt5/search.html?q={}".format(text.lower()))
if index == 4:
webbrowser.open("http://pyqt.sourceforge.net/Docs/PyQt4/{}.html".format(text.lower()))