...I thought there is some function in Qt...
But I did it with math calculation like you told me, and now it works...