xwe, this is a real tricky one, but stay with me and all will be understood.
The reason you get your compilation error is this:
The class attempting to access the
protected member is
Tester while the type of the reference to the object being accessed is
Q.
Q is not the same as, nor a subclass of,
Tester, so the access is not allowed.
The
Java Programming Language By Arnold & Gosling(
http://java.sun.com/docs/books/javaprog/) explains this really well.