Is rendering cache disabled in Settings => Options => Rendering? If this is the problem you can either disable it or call setCacheImage( None ) on the layer to dismiss the current cache.
–
Matthias KuhnApr 26 '13 at 7:12

def md5checksum(fp):
import hash
with open(fp, 'rb') as fh:
m = hashlib.md5()
while True:
data = fh.read(8192)
if not data:
break
m.update(data)
return m.hexdigest()
import time
import copy
a,b = str(),str()
while True:
a = md5checksum(fp) # file
if a != b: # the file has changed, do what you want
myLayer.triggerRepaint()
b = copy.copy(a) #shallow copy, otherwise a and b will point at the same object
else:
sleep.time(1) #wait for 1 sec, then recheck