You have to check which Python you are using. I had the same problem because the Python I was using was not the same one that brew was using. In your command line:
which python
which brew
cd /usr/local/lib/python2.7/site-packages
ls
//you can see PyQt4 and sip are hereusr/local/lib/python2.7/site-packages
to your python path.open ~/.bash_profile
//you will open your bash_profile file in your editor'export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH'
to your bash file and save itpython
import PyQt4
// it is ok now