Q:

TextField change background

I have a custom button that when is pressed I want to change the color of the TextFields where there are no text written inside from default to red for a 2 seconds, and pop-up a tooltip that say that you have to write there something before going forward. 
TextField {
    id: textfield_derivat
    placeholderText: qsTr("Write a comment here...")
    horizontalAlignment: Text.AlignHCenter
}

CustomSelectionButton {
    id: go_button
    x: 378
    y: 342
    text: "Let's go!"
    anchors.rightMargin: 19
    anchors.bottomMargin: 17
    anchors.bottom: parent.bottom
    anchors.right: parent.right
    height: default_button_height - 10
    font.pointSize: default_font_size
    MouseArea {
        anchors.fill: parent
        onClicked: {
            if( check_text_field(textfield_derivat.text) === true )
            {
                /* code here */
            }
            else
            {
                textfield_derivat.text = "Please fill up the text"
                textfield_derivat.background = "red"
            }

I got this error doing that - Error: Cannot assign QString to QQuickItem*

A:

This is because background is a QQuickItem and not a QString. You should write this (make sure your initial color is as you like):
TextField {
    id: textfield_derivat
    placeholderText: qsTr("Write a comment here...")
    horizontalAlignment: Text.AlignHCenter

    background: Rectangle { 
        id: txt_back
        implicitWidth: 200
        implicitHeight: 40
        color: "white" 
    }
}

...

//textfield_derivat.background = "red"
txt_back.color = "red"

Taken from: https://doc.qt.io/qt-5/qtquickcontrols2-customize.html#customizing-textfield
Note that there are Animation's available in QML, together with using State's and Transition's, this might make a more readible solution

