A Perth-bound Qantas aircraft swiftly diverted, when the pilot declared an on-board emergency due to smoke filling the cockpit.