Depending upon your operating system, there are many ways that Qt is distributed. Here is the recommended method for getting the Qt dependency installed to setup and build gpt4all-chat from source.
Create a Qt account
Go to the Qt open source download page
NOTE: This is for macOS. For Linux it is similar, but you need ming64 for Windows, not the MSVC install
git clone --recurse-submodules https://github.com/nomic-ai/gpt4all
NOTE: File->Open File or Project and navigate to the gpt4all-chat repo and choose the CMakeLists.txt