<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Switch focus on tab press]]></title><description><![CDATA[<p dir="auto">It's a touch screen program, but the customer wants to use an external keyboard. Please advise on the best method to handle it while pressing the tab key. focus should also change</p>
]]></description><link>https://forum.qt.io/topic/145792/switch-focus-on-tab-press</link><generator>RSS for Node</generator><lastBuildDate>Thu, 29 Oct 2026 15:47:54 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/145792.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 15 Jun 2023 14:40:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Switch focus on tab press on Fri, 16 Jun 2023 10:46:20 GMT]]></title><description><![CDATA[<p dir="auto">@jsulmWhen I hit the tab, the focus does not change from one input field to another, and we must instead manually click on the desired field to set it as the focus. However, the user claims they do not want to touch the touchscreen keypad and instead only want to utilise external keypads. when user press enter key or tab so easily focus should <a href="http://change.in" target="_blank" rel="noopener noreferrer nofollow ugc">change.in</a> below code what to change from gross weight to tare weight after clicking the tab or enter.</p>
<p dir="auto">AgShiftNameValue {<br />
id: dlvyGrossContainer<br />
objectName: "dlvyGrossContainer"</p>
<pre><code>                    itemHeight: getItemHeight()

                    name: qsTr("Dlvy Gross wt")
                    isEnabled: isCheckerboardValid()
                    valueType: "Float"
                    placeValue:   "Tap &amp; Enter"
                    value: root.inspectionGrossWeight
                    valueState: root.inspectionGrossWeight ? "Selected" : "Empty"
                    clickPopup: numericKeypad
                    keypadAlignment: TextInput.AlignTop

                    mandatory: (root.inspectionGrossWeight == "") ? true : false
                    visible: !showVarietyWeightPanel() &amp;&amp; isWeightVisible()
                    styleSheet: valuesModel._styleSheet
                    sectionConfig: valuesModel.sectionConfig



                    function isWeightVisible() {
                        var m = JSON.parse(Settings.commodities)
                        return root.commodity &amp;&amp; root.commodity.length &amp;&amp; m[root.commodity.toLowerCase()]["measuredByWeight"]
                               &amp;&amp; !(Session.inspection_type === "training")
                    }

                    function initialize() {
                        valueState = root.inspectionGrossWeight ? "Selected" : "Empty"
                    }

                    onValueChanged:{
                          console.debug(logObj.pageAction,Settings.GROSS_WEIGHT_MAX_THRESHOLD   +" dekho kya aaya hai")

                        if (Number(root.inspectionGrossWeight) &gt;= Settings.GROSS_WEIGHT_MAX_THRESHOLD || Number(root.inspectionGrossWeight) &lt; Settings.GROSS_WEIGHT_MIN_THRESHOLD) {
                            notifygrossText.show("Dlvy Gross wt should be greater than or equal to 1 and less than "+ Settings.GROSS_WEIGHT_MAX_THRESHOLD)
                        } else {
                            notifygrossText.hide()
                        }
                        if(!isEmptyVal(root.inspectionGrossWeight) &amp;&amp; root.inspectionTareWeight !== 0){
                            (Number(root.inspectionTareWeight) &gt;= Number(root.inspectionGrossWeight)) ? notifytareText.show("Dlvy Tare wt should be less than Dlvy Gross weight") : notifytareText.hide()
                        }
                    }

                    onSelectionChanged: {
                        root.inspectionGrossWeight = newItem
                    }
                }


                Text {
                    id: notifytareText
                    visible: false
                    width: 300
                    leftPadding: 20
                    anchors.top: dlvyTareContainer.bottom
                    anchors.horizontalCenter: parent.horizontalCenter
                    color: "black"
                    font.pointSize: 12
                    font.family: "Ubuntu"

                    function show(message) {
                        text = message
                        visible = true
                    }

                    function hide() {
                        visible = false
                        text = ""
                    }
                }

                AgShiftNameValue {
                    id: dlvyTareContainer
                    objectName: "dlvyTareContainer"

                    itemHeight: getItemHeight()

                    name: qsTr("Dlvy Tare wt")
                    isEnabled: isCheckerboardValid()
                    valueType: "Float"
                    placeValue: "Tap &amp; Enter"
                    value: root.inspectionTareWeight // ? root.inspectionTareWeight : "0"
                    valueState: root.inspectionTareWeight ? "Selected" : "Empty"
                    clickPopup: numericKeypad
                    keypadAlignment: TextInput.AlignTop
                    mandatory: initialize()
                    visible: !showVarietyWeightPanel() &amp;&amp; isWeightVisible()
                    styleSheet: valuesModel._styleSheet
                    sectionConfig: valuesModel.sectionConfig



                    function isWeightVisible() {
                        var m = JSON.parse(Settings.commodities)
                        return root.commodity &amp;&amp; root.commodity.length &amp;&amp; m[root.commodity.toLowerCase()]["measuredByWeight"]
                               &amp;&amp; !(Session.inspection_type === "training")
                    }

                    function initialize() {
                        valueState = root.inspectionTareWeight ? "Selected" : "Empty"
                        return (valueState == "Empty") ? true : false
                    }

                    onSelectionChanged: {
                        root.inspectionTareWeight = newItem
                    }

                    onValueChanged: {
                        if(!isEmptyVal(root.inspectionGrossWeight)){
                            (Number(root.inspectionTareWeight) &gt;= Number(root.inspectionGrossWeight)) ? notifytareText.show("Dlvy Tare wt should be less than Dlvy Gross weight") : notifytareText.hide()
                        }
                    }
                }
</code></pre>
]]></description><link>https://forum.qt.io/post/761667</link><guid isPermaLink="true">https://forum.qt.io/post/761667</guid><dc:creator><![CDATA[Gaurav-Agshift]]></dc:creator><pubDate>Fri, 16 Jun 2023 10:46:20 GMT</pubDate></item><item><title><![CDATA[Reply to Switch focus on tab press on Fri, 16 Jun 2023 05:38:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/gaurav-agshift">@<bdi>Gaurav-Agshift</bdi></a> said in <a href="/post/761559">Switch focus on tab press</a>:</p>
<blockquote>
<p dir="auto">Please advise on the best method to handle it while pressing the tab key. focus should also change</p>
</blockquote>
<p dir="auto">That should work out of the box. What exactly is the problem?</p>
]]></description><link>https://forum.qt.io/post/761639</link><guid isPermaLink="true">https://forum.qt.io/post/761639</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Fri, 16 Jun 2023 05:38:45 GMT</pubDate></item></channel></rss>