A connector for connecting an inverter to be accommodated into an inverter case and a motor to be accommodated into a motor case with an upper side as an inverter side and a lower side as a motor side, comprising: an inverter-side terminal block provided on the inverter side, and provided with a first mounting portion and a second mounting portion, wherein the first mounting portion is in the form of a short tube open upward and a lower opening edge surface serves as a first supporting surface, and the second mounting portion is in the form of a short tube open downward and an upper opening edge surface serves as a second supporting surface; a motor-side terminal block provided on the motor side; a first housing, a first protruding portion protruding outwardly provided on an outer peripheral surface of the first housing near a lower opening, wherein the first housing is mounted in the first mounting portion with the first protruding portion thereof placed on the first supporting surface of the first mounting portion, thereby being supported on the first supporting surface in a floating manner, such that the first housing is slidable in directions parallel to the first supporting surface; a second housing, a second protruding portion protruding outwardly provided on an outer peripheral surface of the second housing near an upper opening, wherein the second housing is mounted in the second mounting portion with the second protruding portion thereof sandwiched between the second supporting surface and a retainer member, thereby being supported on the second supporting surface in a floating manner, such that the second housing is slidable in directions parallel to the second supporting surface; a first terminal held in the first housing and to be mated with an inverter-side terminal for supplying alternating-current power from the inverter in a direction orthogonal to the first supporting surface; a second terminal held in the second housing and to be mated with a motor-side terminal provided in the motor-side terminal block in a direction orthogonal to the second supporting surface; and a flexible conductive wire having one end part connected to the first terminal and the other end part connected to the second terminal and arranged slidably in each of directions along the first supporting surface and directions along the second supporting surface, wherein a seal member is arranged between a downwardly projecting inverter-side rib of the inverter case and a main body portion of the motor-side terminal block. an inverter-side terminal block provided on the inverter side, and provided with a first mounting portion and a second mounting portion, wherein the first mounting portion is in the form of a short tube open upward and a lower opening edge surface serves as a first supporting surface, and the second mounting portion is in the form of a short tube open downward and an upper opening edge surface serves as a second supporting surface; a motor-side terminal block provided on the motor side; a first housing, a first protruding portion protruding outwardly provided on an outer peripheral surface of the first housing near a lower opening, wherein the first housing is mounted in the first mounting portion with the first protruding portion thereof placed on the first supporting surface of the first mounting portion, thereby being supported on the first supporting surface in a floating manner, such that the first housing is slidable in directions parallel to the first supporting surface; a second housing, a second protruding portion protruding outwardly provided on an outer peripheral surface of the second housing near an upper opening, wherein the second housing is mounted in the second mounting portion with the second protruding portion thereof sandwiched between the second supporting surface and a retainer member, thereby being supported on the second supporting surface in a floating manner, such that the second housing is slidable in directions parallel to the second supporting surface; a first terminal held in the first housing and to be mated with an inverter-side terminal for supplying alternating-current power from the inverter in a direction orthogonal to the first supporting surface; a second terminal held in the second housing and to be mated with a motor-side terminal provided in the motor-side terminal block in a direction orthogonal to the second supporting surface; and a flexible conductive wire having one end part connected to the first terminal and the other end part connected to the second terminal and arranged slidably in each of directions along the first supporting surface and directions along the second supporting surface, wherein a seal member is arranged between a downwardly projecting inverter-side rib of the inverter case and a main body portion of the motor-side terminal block.