The election of any member declared duly elected to a seat in the senate or house of representatives of the General Assembly, may be contested by any qualified voter of the district to be represented by such senator or representative, but when members of the House of Representatives are elected from the State at large, the election of any such member may be contested by any qualified elector in the State.
10 ILCS 5/23-12