Open paboum opened 5 years ago
Hey
I think the problem is the relative import, while using relative imports seem to work with go run
or go build
, they can cause issues when using something like go list
(which is used internally by qtdeploy
to detect dependencies).
To solve this, you just need to use a "normal" import, such as myproject/fancy
where the fancy folder is located in $(go env GOPATH)/src/myproject/fancy
for example.
I can look into the relative import issue again, but IIRC then I wanted to supported them but couldn't due to the way go list
works. Or maybe it was possible to supported them, but it would have come with quite a lot of overhead, I can't really recall it.
I'm quite new to Go in general so this could be totally wrong, but having the following code:
results in:
fancy/fancy.go:8:3: w.AppendPlainText undefined (type *widgets.QPlainTextEdit has no field or method AppendPlainText)
When I move this file back to main package, it works fine.
The experiments I made lead me to the conclusion that while the "." package is built correctly, the dependencies are assumed to work without Qt imports, which is false in larger projects.