With his qualifications he obtained a post as resident medical officer at the Belfast General Hospital. He next spent some time in London, at St Thomas's Hospital, where he met his future wife, Ada Bourne, daughter of George Bourne, a prominent Staffordshire farmer. She was a ward sister and friend of Florence Nightingale, and a member of the Salvation Army. The pair were married in 1876, setting up house at 41, Great Victoria Street, Belfast, where Whitla established a general medical practice. He was awarded the MD of the Queen's University of Ireland in 1877, with first class honours, gold medal, and commendation. Whitla was appointed physician to the Belfast Royal Hospital and the Ulster Hospital for Children and Women in 1882. He held post at the Belfast Royal Hospital and in the Royal Victoria Hospital, of which it was the forerunner, until his retirement in 1918. The Whitlas' move in 1884 to 8, College Square North, was an indication of a success by no means near its zenith. He succeeded Seaton Reid as professor of materia medica at the Queen's College in 1890; he was twice president of the Ulster Medical Society. Appointed a Knight Bachelor in the 1902 Coronation Honours list published on 26 June 1902, he was knighted by the Lord Lieutenant of Ireland, Earl Cadogan, at Dublin Castle on 11 August 1902. In 1906 Whitla was appointed a governor of Methodist College Belfast and he took a keen interest in the school's affairs. That year the Whitlas moved to Lennoxvale, a suburban mansion, they also retained the professional house in College Square. In 1919, he retired as Professor of Materia Medica in the university. He served the British Medical Association as president.
Political career
A strong unionist, he was elected to parliament in 1918, serving until 1923 as representative of the Queen's University at Westminster. He was appointed honorary physician to the king in Ireland in 1919 and was subsequently university pro-chancellor.
Later life
Sir William and Lady Whitla were childless, and they were wealthy. Together with his practice and books he had a flair for making wise investments, buying oil shares to his great financial advantage. The Whitlas travelled widely, visiting Russia, Canada, and many Mediterranean cities. As a biblical scholar he contributed an introductory study of the nature and the cause of unbelief, of miracles, and prophecy to an edition of Sir Isaac Newton's Daniel and the Apocalypse published by John Murray in 1922. As the decade progressed his public appearances were fewer, and after a stroke in 1929 he was confined to his room. Lady Whitla died in 1932; he died at Lennoxvale on 11 December 1933, and was given a civic funeral two days later; he was buried at Belfast City Cemetery. During Whitla's lifetime his gifts to his profession included the Good Samaritan stained glass window erected in the Royal Hospital, and a building to house the Ulster Medical Society. At his death Lennoxvale was bequeathed to Queen's University as a residence for the Vice-Chancellor. The university also was his residuary legatee, and acted on his suggestion that the available funds should provide an assembly hall. The Sir William Whitla Hall was opened in 1949. He also left £10,000 to Methodist College Belfast to build a chapel, library or hall. The Whitla Hall at the Methodist College was opened in 1935.