Qt QPlainTextEdit background

前端 未结 5 948
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:18

    In order to modify the background, you need to modify the palette of your QPlainTextEdit and to set background visible:

    myPlainTextEdit->setPalette(QPalette(/*Select the constructor you need*/));
    myPlainTextEdit->setBackgroundVisible(true);
    

提交回复
热议问题