[Qt-interest] scrollable read only line edit
Ian Clark
mrrooster at gmail.com
Wed Aug 4 17:38:47 CEST 2010
On 4 August 2010 13:58, Sarvesh Saran <Sarvesh.Saran at synopsys.com> wrote:
> Hi,
>
>
>
> How do I create a scrollable read only line edit in QT?
>
>
>
> I do not want the user to be able to edit its contents..however merely
> making the line edit read only does not work as it is no longer scrollable.
>
Have you tried nesting it within a QScrollArea?
http://doc.trolltech.com/4.6/qscrollarea.html
You'll need to set it's size policy to an appropriate value to ensure
the widget displays at the maximum height inside the scroll widget. (I
can never remember which one I want off the top of my head, I think
it's QSizePolicy::MinimumExpanding )
Cheers,
Ian
More information about the Qt-interest-old
mailing list