Introduction
QodeAssist is a plugin for the Qt Creator IDE.
Using the plugin, you can get code completions, code snippets, and documentation. It has predefined prompts that help focus on Qt.
For installation, you can download the plugin from the releases page and follow the instructions in the README file.
Using with Ollama (on another machine)
I want to use the plugin with Ollama, but I don’t want to install Qt Creator and Ollama on the same machine. So, I will use Ollama running on a server and Qt Creator on my local machine.
For Ollama installation, you can follow the instructions on the Ollama page.
To access the Ollama server remotely, you need to set up two environment variables on the Ollama machine:
OLLAMA_HOST=0.0.0.0:11434
OLLAMA_ORIGINS=*
I did this on a Windows machine, but I think it is the same on a Linux machine.
Then load the default QodeAssist model.
ollama run qwen2.5-coder:7b
After that, you need to change the QodeAssist settings in Qt Creator to use the Ollama server. Set both URL variables to the remote machine.
Connection check
To check if the connection is working, you can use the curl command on the local machine.
curl -X POST http://your_remote_machine_ip:11434/api/chat
Conclusion
With this setup, you can use the plugin in Qt Creator without needing to install both Qt Creator and Ollama on the same machine.
Some projects require a lot of resources, so it is better to separate the IDE and the AI assistant onto different machines.