Rotate a QLine
-
Hi,
I want to rotate a QLine, but I don't know how. I tried ui->line->setRoation() but thats not a valid command.
Do you know how to rotate it?
Thanks -
I found the Line widget in the Display Widgets menu in Qt Creator.
The Line widget isn't custom
Sorry for the delay, I have to wait 600 second to post a reply@Sucharek Okay, those "Line" are actually QFrame and with these elements you won't be able to do any rotation. In this case you must create custom QWidget, override the paintEvent to make the custom paint and promote them if you want to use them through QtDesigner.
-
Ok, but if I'd do that, will it lose a stretching (expanding) ability?
If it does, is there an object (that I can make look like a line) that can rotate?@Sucharek said in Rotate a QLine:
Ok, but if I'd do that, will it lose a stretching (expanding) ability?
If it does, is there an object (that I can make look like a line) that can rotate?That's actually a frame. You can change it to vertical using...
setFrameShape(QFrame::VLine);
and back to horizontal using...
setFrameShape(QFrame::HLine);