After struggling with this for 30 minutes, this is what finally got it working.
get this file: http://www.dannywynne.com/blog/wp-content/uploads/2012/10/pyqt4.zip
Open Sublime Text editor and go to the preferences->Browse Package and select the SublimeCodeIntel folder.
Paste the unzipped pyqt4.cix file in to the libs/CodeIntel2/catalogs folder
Open ~/.codeintel/config in sublime and paste in the following:
{
"Python": {
"python": '/Library/Frameworks/Python.framework/Versions/2.7/bin/python',
"pythonExtraPaths": ['/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7']
},
}
Of course, if your library path is different, modify as needed. If you are struggling to find the library, try typing find . | grep QtCore.so
and then use that directory in the pythonExtraPaths list
In a python file, try typing:
from PyQt4.QtCore import *
QTime.
and wait for autocompletion. It may take a few seconds the first time you try this, as the index needs to build. There will be a status message indicating this in the bottom toolbar if it is indeed indexing.
References: http://www.dannywynne.com/blog/?p=66