[Interest] how QQmlProperty works ?

jagernicolas at legtux.org jagernicolas at legtux.org
Mon Feb 29 05:40:20 CET 2016


 

Hi, 

I dont understand how QQmlProperty works, consider this example : 

main.cpp : http://pastebin.com/B17uY2Av [1] 

MainForm.ui.qml : http://pastebin.com/N3JKnU2h [2] 

output : 

Property value: QVariant(int, 3)
Property value: QVariant(int, 3)
Property value: QVariant(double, 10)
Property value: QVariant(double, 500) 

first, in the window the image isn't resized, it still has 10px. 

second, how can set and display with qDebug values like : 

fillMode: Image.Tile 

third, when using qcreator everytime I clicked on MainForm.ui.qml I got
the window of design opened, if I click on edit there is a message that
this file should only be edited trough the designer, ok but to be able
to use findchild I have to set objectName. I haven't found how to do
that in the designer. Personnaly I don't like to have the designer
opened by default, I would like to get the edit mode opened by default. 

four, instead of using objectName, could we use id ? 

Regards, 

Nicolas 
 

Links:
------
[1] http://pastebin.com/B17uY2Av
[2] http://pastebin.com/N3JKnU2h
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160229/13af915c/attachment.html>


More information about the Interest mailing list