Two hours will be sufficient for a connection - it's only a short walk and all in the same terminal building. MEL is one of the nicer and easiest Oz airports for such a connection. In any case, if you are running late and look like missing the connection, QF should fit you in on the next available domestic flight. If they are on different tickets, it might be worth asking that the connecting flight details are on your passenger file for both bookings.