After military defeats, Qing officials adopt Western weapons, industry and technical knowledge while attempting to preserve the dynasty’s traditional political and cultural foundations.