1
votes

If you check out scrollareawidgetcontents there is an "error" sign.

qt designer scroll area error

Scroll area has size policy set to:

  • horizontal: expanding
  • vertical: fixed

Scroll area widget contents has size policy set to:

  • horizontal: expanding
  • vertical: expanding

If I try to add a Label with size policy:

  • horizontal: expanding
  • vertical: ignored

The label is not scrollable.

What I want to achieve with this is a scrollable non-editable text area.

My concrete questions:

  • why does that scrollareawidgetcontents error show up?
  • how to achieve what I want to achieve?
1

1 Answers

2
votes

I don't see any label on the picture, so I can't tell what you do wrong. The red icon on scrollareawidgetcontents is not an error, it indicates that the widget has no layout. If you add a label to it and apply a layout to it, the icon will disappear.

Anyway, you should use Text Browser widget (QTextBrowser) to display scrollable text.