My directory tree is like this:
Qt Code:
  1. root
  2. assets
  3. content
  4. skins
  5. default
  6. test
  7. main.cpp
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. // I do this in test/main.cpp:
  2. view.engine()->setBaseUrl(QUrl::fromLocalFile(
  3. QCoreApplication::applicationDirPath() + "/../"));
  4.  
  5. // I do this to a QQuickView instance:
  6. setSource(QUrl::fromLocalFile("skins/default/main.qml"));
To copy to clipboard, switch view to plain text mode 

main.qml loads OK, but cannot reference assets in the assets subdirectory as, "assets/someimage.png", but needs to do "../../assets/someimage.png", also I cannot import as 'import "content"', but need to do 'import "../../content"', whereas I'd like to do 'import "content"'. Does there exist a workaround?