How long did the Qing dynasty last for?