Qt QPlainTextEdit background

前端 未结 5 1079
Happy的楠姐
Happy的楠姐 2021-01-04 20:29

I want to change the background color of a QPlainTextEdit, how do I do this?

5条回答
  •  长情又很酷
    2021-01-04 21:11

    Slightly confusingly they call it role rather than colour/color.

    https://doc.qt.io/qt-5/qwidget.html#setBackgroundRole

    hint - if you can't find a function for a particular control, click on show inherited members - most general settings are in qWidget which is the basis for eveything drawn on screen.

提交回复
热议问题