29 import QtQuick.Controls 2.3
46 property bool upperCase:
true 47 property bool zeroPad:
true 48 property bool showPrefix:
true 49 property int digits: Math.abs(topValue).toString(16).
length 54 inputMethodHints: Qt.ImhNoPredictiveText | (upperCase ? Qt.ImhPreferUppercase : 0)
55 inputMask: (value < 0 ?
"-" :
"") + (showPrefix ?
"\\0\\x" :
"") +
"H".repeat(digits)
57 validator: RegExpValidator {
58 regExp:
new RegExp(
"-?(0x)?[0-9A-Fa-f]{1," + control.digits +
"}")
61 function textFromValue(value, locale) {
62 var ret = Math.abs(Number(value)).toString(16);
63 if (zeroPad && digits > ret.length)
64 ret =
"0".repeat(digits - ret.length) + ret;
66 ret = ret.toUpperCase();
73 function valueFromText(text, locale) {
74 return parseInt(text, 16);
QString objectName() const const