This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Kirigami.InlineMessage usage

Tags: None
(comma "," separated)
alanbouteiller
Registered Member
Posts
6
Karma
0

Kirigami.InlineMessage usage

Mon Nov 21, 2022 9:01 am
Hi, I want to use Kirigami.InlineMessage in my config but nothing work. What I miss ?

The code of my config page :
Code: Select all
import QtQuick 2.15
import QtQuick.Controls 2.15 as QtControls
import QtQuick.Layouts 1.15 as QtLayouts

import org.kde.kirigami 2.19 as Kirigami

Kirigami.Page {

  id: intervalConfigPage

  property alias cfg_updateInterval: updateIntervalSpin.value

  Kirigami.InlineMessage {
    Layout.fillWidth: true
    text: "Check out <a href=\"https://kde.org\">KDE's website!<a/>"
    onLinkActivated: Qt.openUrlExternally(link)
    visible: true
  }

  Kirigami.FormLayout {

    QtControls.SpinBox {
      id: updateIntervalSpin
      Kirigami.FormData.label: "Update every: "
      from: 1
      to: 1440 // 1 day
      editable: true
      textFromValue: (value) => value + " minute(s)"
      valueFromText: (text) => parseInt(text)
    }

  }

}

alanbouteiller
Registered Member
Posts
6
Karma
0
Ok apparently the import of QtQuick.Controls must be named controls and not QtControls as I did.

The documentation doesn't mention it at all :-\

Code: Select all
import QtQuick.Controls 2.15 as Controls


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], kesang, Yahoo [Bot]