Change flight mode via QGC widgets

Good night! How to change flight mode via QGC widget? I try

import QtQuick 2.2
import QGroundControl.Controls      1.0
import QGroundControl.FactSystem    1.0
import QGroundControl.FactControls  1.0
import QGroundControl.Palette       1.0
import QGroundControl.ScreenTools   1.0
import QGroundControl.Controllers   1.0

Rectangle {
    anchors.fill:   parent
    color:          qgcPal.window

    CustomCommandWidgetController {
        id:         controller
        factPanel:  panel
    }

    QGCPalette { id: qgcPal; colorGroupEnabled: enabled }

    Column {
        spacing: ScreenTools.defaultFontPixelHeight

		
		QGCButton {
            text: "1"
            // Arguments to CustomCommandWidgetController::sendCommand (MAVLink COMMAND_LONG)
            //   command id
            //   component id
            //   confirmation
            //   param 1-7
            onClicked: controller.sendCommand(176, 50, 0, 1 , 0, 0, 0, 0, 0, 0)
        }
		
		QGCButton {
            text: "1"
            // Arguments to CustomCommandWidgetController::sendCommand (MAVLink COMMAND_LONG)
            //   command id
            //   component id
            //   confirmation
            //   param 1-7
            onClicked: controller.sendCommand(176, 50, 0, 12 , 0, 0, 0, 0, 0, 0)
        }
		
        QGCButton {
            text: "65 | 65536 new"
            // Arguments to CustomCommandWidgetController::sendCommand (MAVLink COMMAND_LONG)
            //   command id
            //   component id
            //   confirmation
            //   param 1-7
            onClicked: controller.sendCommand(176, 50, 0, 65 , 0, 0, 0, 0, 0, 0)
        }
	
		QGCButton {
            text: "65 | 458752t"
            // Arguments to CustomCommandWidgetController::sendCommand (MAVLink COMMAND_LONG)
            //   command id
            //   component id
            //   confirmation
            //   param 1-7
            onClicked: controller.sendCommand(176, 50, 0, 65 , 0, 0, 0, 0, 0, 0)
        }
		
		QGCButton {
            text: "81 | 65536"
            // Arguments to CustomCommandWidgetController::sendCommand (MAVLink COMMAND_LONG)
            //   command id
            //   component id
            //   confirmation
            //   param 1-7
            onClicked: controller.sendCommand(176, 50, 0, 81 , 0, 0, 0, 0, 0, 0)
        }

		
    }
}

but it’s don’t work. I get image

Please don’t post in multiple places

I posted in ardupilot because a lot of my questions in px4 discuss have been forgotten