I wanted to understand how to use Qml defined components within an
existing Qt application framework.

 

When I run the samegame example using the qml.exe it loads fine, however
when I added it to a QDeclarativeComponent using loadUrl() inside a Qt
app, the component does not find the imported QML types.

 

The QDeclarativeError.description() indicates that the import path is
not used: -

"Network error for URL C:/samegame/Dialog.qml"

 

The import "content" statement does not seem to work correctly in this
case.

 

If I copy all QML components to the top level the QML Types load as
expected.

 

I've also noticed that the QDeclarativeView method
"setResizeMode(QDeclarativeView::SizeRootObjectToView)" 

does not make any difference to the root context display size. Is there
something else I must do? 

 

For me the root context is drawn the same size every time.

 

Regards

David Robinsion

 


Please refer to www.anite.com for individual Anite company details. The 
contents of this e-mail and any attachments are for the intended recipient 
only. If you are not the intended recipient, you are not authorised to and must 
not disclose, copy, distribute, or retain this message or any part of it. It 
may contain information which is confidential and/or covered by legal 
professional or other privilege. Contracts cannot be concluded with us nor 
legal service effected by email.  

Anite plc
Registered in England No.1798114
Registered Office: 353 Buckingham Avenue Slough Berks SL1 4PF United Kingdom 
VAT Registration No. GB 787 418187

Scanned for viruses by Mimecast.
_______________________________________________
Qt4-preview-feedback mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback

Reply via email to