pass weakref to stylesheet query to avoid memory leak