Is there any way to draw a line of arbitrary angle and width in the Designer, or do I have to manually code it?
In designer there are Horizontal and Vertical lines but seemingly no way to alter their width - is that true?
Thanks,
Doug
Is there any way to draw a line of arbitrary angle and width in the Designer, or do I have to manually code it?
In designer there are Horizontal and Vertical lines but seemingly no way to alter their width - is that true?
Thanks,
Doug
You can change their width either with properties or by clicking the resize arrows on the edges...
Any other way would require you to code QPainter events for your widgets.
This might sound like a really stupid question, but why would you want to use a diagonal line in Designer?
I have an application where audio can have alternate routings amoung functional block and I need to show the current routing - that's why I'm using horizontal, and other, lines.
In designer, I can change the resize handles, which changes the line parameters, but the line remains 1 pixel wide in designer, and when the window is run - not the intuitive functionality at all.
Doug
I see the problem, Designer is drawing a line by instantiating a QFrame and setting its Style to HLine, so the "Frame" width is ignored. I have to manually add a call to setLineWidth() with a value > 1. So it looks like it's just poor design in Designer.
Doug
If that is the case, why are there Horizontal Line and Vertical Line widgets in the designer? To my mind, they should either work "correctly" or shouldn't be there.
%-)
Just my opinion.
Doug
To make a visual separation between two sections of the form.
They work correctly. They just don't do what you'd want them to. Why not just either place a QLabel with a pixmap of a diagonal line or set a background brush with the line? Or use stylesheets...To my mind, they should either work "correctly" or shouldn't be there.
All good suggestions, and as a beginner all things I need to learn. Thanks.
I don't mean to disparage the Qt tools, in general I like Qt a lot.
Doug
Bookmarks