Nova Flow OS
Nova Flow OS
Nova Flow OS
  • Nova Flow en el Dial
  • Qt/QML en imágenes
    • Silica
      • Imágenes High Fidelity
    • MauiKit
      • Imágenes High Fidelity
      • KIO
      • Nepomuk
    • Plasma Components
      • Imágenes High Fidelity
    • QML-Asteroid
    • FishUI
      • Imágenes High Fidelity
    • Lomiri UI Toolkit
      • Imágenes High Fidelity
    • Dtk Declarative
      • Imágenes High Fidelity
    • ControlKit
      • Imágenes High Fidelity
    • QSkinny
      • Imágenes High Fidelity
    • Otros
    • Kirigami
      • Aplicaciones Kirigami con otros estilos
      • Imágenes High Fidelity
      • Estilo Windows 11 para Qt Quick Controls
  • MauiKit
    • Controles
      • ApplicationWindow
      • SettingsDialog
      • InfoDialog
      • InputDialog
      • PopupPage
      • SideBarView
      • TabView
      • AppViews
      • SplitView
      • TabBar
      • ToolBar
      • SelectionBar
      • GridBrowser
      • ListBrowser
      • ListItemTemplate
      • SwipeBrowserDelegate
      • GalleryRolItem
      • CollageItem
      • ToolButtonMenu
      • MenuItemActionRow
      • ToolActions
      • Page
      • FileDialog
      • Badge
      • Holder
      • FloatingButton
      • Chip
      • ColorsRow
      • CloseButton
      • IconItem
      • Notify
      • ShadowedRectangle
      • SearchField
      • Flow
      • Referencia completa: MauiKit
      • Referencia completa: Accounts
      • Referencia completa: Calendar
      • Referencia completa: File Browsing
      • Referencia completa: Image Tools
      • Referencia completa: Terminal
      • Referencia completa: Text Editor
      • Referencia completa: MauiMan
      • Qt Quick Controls
      • Referencia completa: tipos QML
    • Documentación útil
      • Aclaración
      • Links a recursos externos
        • Ejemplos
      • Actuaciones condicionales
      • Colores
      • Anclaje de controles
      • Eventos de respuesta
      • Animaciones
      • Efectos
      • Conectar funcionalidad C++ con la interfaz QML
      • Componentes modelo-delegado o listas y cuadrículas
      • Enviar señales
      • Añada contenido online a su aplicación
      • Compile y empaquete su aplicación
      • Integración con GitHub
  • Guía de programación QML para Qt6
  • KDE Dev Guide
Powered by GitBook
On this page
  1. MauiKit
  2. Documentación útil

Eventos de respuesta

Esta página facilita de forma rápida el evento de respuesta característico de cada componente.

Evento OnClicked.

Button {
    id: button
    onClicked: {
    }
}

Controles:

  • Button

  • CheckBox

  • RoundButton

  • ToolButton

  • MenuItem

  • Maui.GridBrowserDelegate

  • Maui.ListBrowserDelegate

  • Maui.SwipeBrowserDelegate

  • Maui.GalleryRollItem

  • Maui.CollageItem

  • Maui.Badge

  • Maui.FloatingButton

  • Maui.Chip

  • Maui.CloseButton

  • Maui.ToolBar > ToolButton

  • Maui.ToolButtonMenu > MenuItem

Evento onTriggered.

Action
{
    icon.name: "love"
    onTriggered: {
    }
}

Controles:

  • Action

  • Maui.MenuItemActionRow > Action

  • Maui.ToolActions > Action

  • Maui.Holder > Action

Evento onAccepted.

Maui.SearchField
{
    placeholderText: "Search for..."
    onAccepted: {
        console.info(text)
    }
}

Controles:

  • Maui.SearchField

  • ComboBox

  • TextField

Eventos particulares.

ColorsRow

Maui.ColorsRow
{
    anchors.centerIn: parent
    colors: ["pink", "mediumspringgreen", "deepskyblue", "royalblue"]
    onColorPicked: {
        console.info(color)
    }
}

Slider

Slider {
    from: 0
    value: 0
    to: 100
    onMoved: {
        console.info(value)
    }
}

Spinbox

SpinBox {
    from: 5
    to: 500
    value: 100

    onValueModified: {
        console.info(value)
    }
}

Switch

Switch {
    checkable: true
    checked: fileIndexing ? true : false
    onToggled: {
        console.info(visualPosition) // 0 ó 1
    }
}

Capturar los eventos del ratón en otros controles.

Es posible usar MouseHandler o HoverHandler para capturar los eventos del ratón en cualquier control. Útil para controles:

  • Rectangle

  • Maui.ShadowedRectangle

  • Maui.Page

  • Maui.IconItem

  • Maui.ListItemTemplate

MouseArea

Rectangle {
    anchors.centerIn: parent
    width: 200
    height: 200
    radius: 4
    color: Maui.Theme.alternateBackgroundColor
    MouseArea {
        anchors.fill: parent
        onClicked: {
            console.info("evento de ratón pulsado")
        }
    }
}

HoverHandler

Útil para cambiar el color de un rectángulo al pasar el ratón por encima.

import QtQuick 2.15
import QtQuick.Controls 2.15
import org.mauikit.controls 1.3 as Maui

Maui.ApplicationWindow
{
    id: root

    Maui.Page {
        anchors.fill: parent

        showCSDControls: true

        Rectangle {
            anchors.centerIn: parent
            width: 200
            height: 200
            radius: 4
            color: mouse.hovered ? Maui.Theme.focusColor : Maui.Theme.alternateBackgroundColor
            HoverHandler {
                id: mouse
            }
        }
    }
}
PreviousAnclaje de controlesNextAnimaciones

Last updated 1 year ago