in Education by
In this qml code: Component { id: userdelegate PictureBox { ... icon: model.icon icon.heigth: 50 } } PictureBox comes from the PictureBox.qml system file in this way: ... Image { id: icon ... width: parent.width; height: 150 } Running qml, I have the error in the title. I need to use PictureBox.qml, but I can't change it. How can I override default height value for PictureBox.qml icon? JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
You can try to bypass QML's scoping rules by traversing Item children until you can find the Image and manipulate it directly. It's possible it could break in the future, but item.toString() gives you something useful: item.toString() -> "QQuickImage(0x114054350)" So, you can try something like this (not tested): function findItemOfType(type, item) { if (item.toString().indexOf(type) != -1) { return child; } for (var i=0;i < children.length;++i) { var child = children[i]; var result = findItemOfType(type, child.children); if (result != null) { return result; } } return null; } Using it like this: findItemOfType("QQuickImage", pictureBoxId);

Related questions

+1 vote
    In ___________, ranges of data are grouped into bins and intervals....
asked Oct 11, 2020 in Education by anonymous
0 votes
    What is the property to access the first child of a node? (a) timestamp.Child1 (b) timestamp. ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
    How can one access the redirectCount property? (a) navigation.redirectCount (b) performance.navigation.redirectCount ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
0 votes
    What is the property to access the first child of a node? (a) timestamp.Child1 (b) timestamp. ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 21, 2021 in Education by JackTerrance
0 votes
    I am trying to upload image by converting image to base64 format. And i am getting below error. Error ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 14, 2022 in Education by JackTerrance
0 votes
    I am trying develop first app in ionic and with codeigniter backend but facing Response for preflight has ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 5, 2022 in Education by JackTerrance
0 votes
    In my case, savepoint was set in Java and I am trying to rollback in a plsql procedure which was ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 1, 2022 in Education by JackTerrance
0 votes
    I want to transfer the contents from part of the a 'Type' array to an excel range (see example ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    I'm trying to convert a ply to a polyhedron stored in postgis. In this example I have a cube ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 4, 2022 in Education by JackTerrance
0 votes
    My model.py: from django.conf import settings from django.db import models from django.db.models.signals ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 1, 2022 in Education by JackTerrance
0 votes
    My model.py: from django.conf import settings from django.db import models from django.db.models.signals ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 29, 2022 in Education by JackTerrance
0 votes
    Pulling my hair out here. All was working fine, and then out of the blue, I started to get some ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 21, 2022 in Education by JackTerrance
0 votes
    I am using module jsonwebtoken 8.4.0 in a nodejs 10.2.0 app. A JWT token is generated on https: ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 16, 2022 in Education by JackTerrance
0 votes
    I have a mobile app(react-native), a resource service(spring boot) and Keycloak Authenticatioin Service(Auth ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 7, 2022 in Education by JackTerrance
...