This looks fantastic!
A define flag would probably work alright with some `when` 's:
# version
const QtVersion {.intdefine.} = 6
# or maybe bools:
const HasQt6 {.booldefine.} = true
Run
Does the `-` sign in the makeLayout mess up autocomplete? I haven't had a
chance to try it yet.
I'm not sure it helps in this case, but for autocomplete I found the pattern of
defining proc's within a template to be handy:
template pushButton(..., doBlk) =
let child = newQPushButton(...)
proc connect(...) =
...
doBlk
Run
It probably stresses nimsuggest tool a bit, but it works. In VSCode the
`connect` and other procs defined in the template will be shown first which
helps discoverability.