qml

How to navigate and focus with TAB?

好久不见. 提交于 2020-07-23 06:35:15
问题 When I run the application and navigate between Name and Address using mouse, I can bring focus into Address by clicking on the rectangle and the cursor turns into a vertical line when the mouse is over rectangle. As soon as I use TAB on Address the cursor changes to a vertical line only when I bring the mouse on top left corner of the rectangle AND by no means I can bring focus into the PathButton ! Here's the Card.qml : import QtQuick 2.9 import QtQuick.Controls 2.5 import

How to navigate and focus with TAB?

生来就可爱ヽ(ⅴ<●) 提交于 2020-07-23 06:33:41
问题 When I run the application and navigate between Name and Address using mouse, I can bring focus into Address by clicking on the rectangle and the cursor turns into a vertical line when the mouse is over rectangle. As soon as I use TAB on Address the cursor changes to a vertical line only when I bring the mouse on top left corner of the rectangle AND by no means I can bring focus into the PathButton ! Here's the Card.qml : import QtQuick 2.9 import QtQuick.Controls 2.5 import

ToolTip.text doesn't change

非 Y 不嫁゛ 提交于 2020-07-23 06:33:37
问题 Here's the definition of my PathButton.qml : import QtQuick 2.0 import QtQuick.Shapes 1.12 import QtQuick.Controls 2.5 Item { property alias pathData: svg.path property alias toolTip: tip.text signal clicked() width: 28 height: width Shape{ transform: Scale{ xScale: 1.2; yScale: 1.2} ShapePath{ id: path fillColor: "black" PathSvg{ id: svg path: pathData } } } ToolTip{ id: tip visible: area.containsMouse } MouseArea{ id: area anchors.fill: parent onClicked: parent.clicked() hoverEnabled: true

QML - Cannot assign to non-existent property “style”

独自空忆成欢 提交于 2020-07-18 09:07:54
问题 I'm using Qt 5.10.1 with Qt Creator 4.5.1 and the style property is never available in elements. For example, as shown here ButtonStyle QML Type , I would like to do: Button { text: "A button" style: ButtonStyle {...} } But, I get the error: Cannot assign to non-existent property "style" I tried with a rectangle, progressbar and I get the same error. Edit #1: I do have all these imports. If the import was missing, I would get the error on ButtonStyle , but the error is on style . import

QML crash in Qt 5.9 - help to read stack trace

心已入冬 提交于 2020-07-15 08:17:22
问题 I am writing an app using Qt 5.9 with C++ main and QML UI on the top. Everything fine (including sending signals from C++ to QML) but when I add ChartView to the UI, I am seeing a crash. The stripped-down version of the ChartView looks like the following; when I omit it from the code, no crash. ChartView { id: _chartView LineSeries { name: "avgZ" XYPoint { x: 0; y: 0} } } This is the stack trace (via excellent backward-cpp): Stack trace (most recent call last): #27 Object "", at

Why doesn't ComboBox show the Selected Item?

送分小仙女□ 提交于 2020-07-14 12:04:32
问题 Here's what I've in my QML: import QtQuick 2.12 import QtQuick.Window 2.12 import QtQuick.Controls 2.5 import QtQuick.Layouts 1.3 Window { visible: true width: 640 height: 480 title: "Test Window" ComboBox{ width: 300 model: testContext.List delegate: ItemDelegate{ width: parent.width contentItem: RowLayout{ Text{ text: modelData.name } Text{ text: " | " + modelData.age Layout.alignment: Text.AlignRight } } background: Rectangle{ color: hovered? "green" : "white" } } } } When I click on the

Few questions on customizing ListView

本秂侑毒 提交于 2020-07-10 06:59:08
问题 Here's what I've in my QML: import QtQuick 2.12 import QtQuick.Window 2.12 import QtQuick.Controls 2.5 import QtQuick.Layouts 1.3 Window { visible: true width: 640 height: 480 title: "Test Window" ListView{ id: listView width: parent.width height: parent.height model: testContext.List interactive: false delegate: ItemDelegate { width: parent.width leftPadding: 3 rightPadding: scroll.width topPadding: 3 bottomPadding: 3 /* padding: { leftPadding: 3 rightPadding: scroll.width topPadding: 3

Issues with focus and Calendar

廉价感情. 提交于 2020-07-10 06:54:11
问题 For both Combobox and Calendar I've added a simple Custom ToggleButton . When the Window becomes small ComboBox 's popup renders on top of other Card BUT in case of Calendar it stays behind other Cards: When I click outside the ComboBox it closes the popup and sets the checked state of ToggleButton to false . In case of Calendar I wanted to set that in onFocusChanged event BUT that doesn't work! Here's the Calendar : import QtQuick 2.9 import QtQuick.Controls 2.5 import QtQuick.Controls 1.4

several questions about QML and PySide2

前提是你 提交于 2020-07-09 17:45:48
问题 I have the following cases, I want to use several Qml: "welcome.qml", "create.qml", "dashboard.qml" in which cases to use QQuickview or QqmlApplicationEngine.? I am using "QQmlAplicatiobEngine" and search in the object with findChild to get the signal, and handle the logic, If the signal completes a condition, I use the engine.load to load another QML. python: class guiBackend(QObject): def __init__(self): self.engine = QQmlApplicationEngine() self.context = self.engine.rootContext() self

How to fix 'Could not load the Qt platform plugin “xcb” in “” even though it was found.' after fixup_bundle macro?

断了今生、忘了曾经 提交于 2020-07-08 11:48:12
问题 I'm trying to setting up a standalone binary archive (.tar.gz) that can run on most Linux distros (ex. Blender). I'm still not familiar with CMake. As far as I know, all the dependencies can be resolved at the install step with fixup_bundle macro. And I assume that the install directory should become a standalone app that can be copied and run on other computers without Qt installed? I'm not sure about the role of CPack here. What I've tried My Qt installation path is /home/<user>/Qt5.12.2/5