Important: Please read the Qt Code of Conduct -

Setting "background:" property on TextArea causes segfault

  • I was surprised when I realized the other day that the reason an app was segfaulting on me was the seemingly innocuous statement in a TextArea:

    background: Rectangle {
        color: colors.window

    (For context, see here.)

    At the suggestion of another developer, I tried setting various attributes of the Rectangle, setting background to an Item, and setting it to null. Nothing worked. Apparently, merely including the background: in the TextArea created the problem.

    I am on Ubuntu 20.04, using Qt 5.12.8. I also verified that the problem exists on Qt 5.15.1. Furthermore, I have tried importing different versions of QtQuick.Controls (up to 2.12), which did not work.

  • Somebody fixed this for me.

Log in to reply