File tree Expand file tree Collapse file tree 4 files changed +45
-1
lines changed Expand file tree Collapse file tree 4 files changed +45
-1
lines changed Original file line number Diff line number Diff line change @@ -16,9 +16,12 @@ qt6_add_qml_module(bitcoin_qml
16
16
stub.qml
17
17
)
18
18
19
+ add_subdirectory (Components )
20
+
19
21
target_link_libraries (bitcoin_qml
20
22
INTERFACE
21
23
bitcoin_qmlplugin
24
+ bitcoin_qml_componentsplugin
22
25
PUBLIC
23
26
Qt6::Widgets
24
27
Qt6::Quick
Original file line number Diff line number Diff line change
1
+ // Copyright (c) 2021 The Bitcoin Core developers
2
+ // Distributed under the MIT software license, see the accompanying
3
+ // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
+
5
+ // The BlockCounter component.
6
+
7
+ import QtQuick
8
+ import QtQuick.Controls
9
+
10
+ Label {
11
+ property int blockHeight: 0
12
+ background: Rectangle {
13
+ color: " black"
14
+ }
15
+ color: " orange"
16
+ padding: 16
17
+ horizontalAlignment: Text .AlignHCenter
18
+ verticalAlignment: Text .AlignVCenter
19
+ font .pixelSize : height / 3
20
+ text: blockHeight
21
+ }
Original file line number Diff line number Diff line change
1
+ # Copyright (c) 2025-present The Bitcoin Core developers
2
+ # Distributed under the MIT software license, see the accompanying
3
+ # file COPYING or https://opensource.org/license/mit/.
4
+
5
+ qt6_add_qml_module (bitcoin_qml_components
6
+ URI BitcoinApp.Components
7
+ VERSION 1.0
8
+ STATIC
9
+ RESOURCE_PREFIX /qt/qml/
10
+ QML_FILES
11
+ BlockCounter.qml
12
+ )
Original file line number Diff line number Diff line change 2
2
// Distributed under the MIT software license, see the accompanying
3
3
// file COPYING or https://opensource.org/license/mit/.
4
4
5
- import QtQml
5
+ import QtQuick
6
6
import QtQuick.Controls
7
+ import BitcoinApp.Components
7
8
8
9
ApplicationWindow {
9
10
id: appWindow
@@ -13,4 +14,11 @@ ApplicationWindow {
13
14
visible: true
14
15
15
16
Component .onCompleted : nodeModel .startNodeInitializionThread ();
17
+
18
+ BlockCounter {
19
+ id: blockCounter
20
+ anchors .centerIn : parent
21
+ height: parent .height / 3
22
+ blockHeight: nodeModel .blockTipHeight
23
+ }
16
24
}
You can’t perform that action at this time.
0 commit comments