Which Qt application are you planning to use? With Qt5 and Qml one can rotate in the Qml root window using:
transform: Rotation {
angle: -90
origin.x: Screen.height / 2
origin.y: Screen.height / 2
}
See also this thread which has a demo application.
Rather than solve the issue on several different Software stacks (X/Qt) I recommend to decide on a stack and tackle the problem there.