Awesome
QodeAssist - AI-powered coding assistant plugin for Qt Creator
QodeAssist is an AI-powered coding assistant plugin for Qt Creator. It provides intelligent code completion and suggestions for C++ and QML, leveraging large language models through local providers like Ollama. Enhance your coding productivity with context-aware AI assistance directly in your Qt development environment.
Table of Contents
- Overview
- Installation
- Configure Plugin
- Supported LLM Providers
- Recommended Models
- QtCreator Version Compatibility
- Development Progress
- Hotkeys
- Troubleshooting
- Support the Development
- How to Build
Overview
- AI-powered code completion
- Chat functionality:
- Side and Bottom panels
- Support for multiple LLM providers:
- Ollama
- LM Studio
- OpenAI-compatible local providers
- Extensive library of model-specific templates
- Custom template support
- Easy configuration and model selection
Installation
- Install Latest QtCreator
- Install Ollama. Make sure to review the system requirements before installation.
- Install a language models in Ollama via terminal. For example, you can run:
For suggestions:
ollama run codellama:7b-code
For chat:
ollama run codellama:7b-instruct
- Download the QodeAssist plugin for your QtCreator.
- Launch Qt Creator and install the plugin:
- Go to MacOS: Qt Creator -> About Plugins... Windows\Linux: Help -> About Plugins...
- Click on "Install Plugin..."
- Select the downloaded QodeAssist plugin archive file
Configure Plugin
<details> <summary>Configure plugins: (click to expand)</summary> <img src="https://github.com/user-attachments/assets/00ad980f-b470-48eb-9aaa-077783d38798" width="600" alt="Configuere QodeAssist"> </details>- Open Qt Creator settings
- Navigate to the "Qode Assist" tab
- Select "General" page
- Choose your LLM provider (e.g., Ollama)
- Select the installed model by the "Select Model" button
- For LM Studio you will see current loaded model
- Choose the prompt template that corresponds to your model
- Apply the settings
You're all set! QodeAssist is now ready to use in Qt Creator.
Supported LLM Providers
QodeAssist currently supports the following LLM (Large Language Model) providers:
Recommended Models:
QodeAssist has been thoroughly tested and optimized for use with the following language models:
- Llama
- CodeLlama
- StarCoder2
- DeepSeek-Coder-V2
- Qwen-2.5
Ollama:
For autocomplete(FIM)
ollama run codellama:7b-code
ollama run starcoder2:7b
ollama run qwen2.5-coder:7b-base
ollama run deepseek-coder-v2:16b-lite-base-q3_K_M
For chat
ollama run codellama:7b-instruct
ollama run starcoder2:instruct
ollama run qwen2.5-coder:7b-instruct
ollama run deepseek-coder-v2
LM Studio:
similar models, like for ollama
Please note that while these models have been specifically tested and confirmed to work well with QodeAssist, other models compatible with the supported providers may also work. We encourage users to experiment with different models and report their experiences.
If you've successfully used a model that's not listed here, please let us know by opening an issue or submitting a pull request to update this list.
QtCreator Version Compatibility
- QtCreator 14.0.2 - 0.2.3 - 0.3.x
- QtCreator 14.0.1 - 0.2.2 plugin version and below
Development Progress
- Basic plugin with code autocomplete functionality
- Improve and automate settings
- Add chat functionality
- Sharing diff with model
- Sharing project source with model
- Support for more providers and models
Hotkeys
- To call manual request to suggestion, you can use or change it in settings
- on Mac: Option + Command + Q
- on Windows: Ctrl + Alt + Q
- To insert the full suggestion, you can use the TAB key
- To insert line by line, you can use the "Move cursor word right" shortcut:
- On Mac: Option + Right Arrow
- On Windows: Alt + Right Arrow
Troubleshooting
If QodeAssist is having problems connecting to the LLM provider, please check the following:
-
Verify the IP address and port:
- For Ollama, the default is usually http://localhost:11434
- For LM Studio, the default is usually http://localhost:1234
-
Check the endpoint:
Make sure the endpoint in the settings matches the one required by your provider - For Ollama, it should be /api/generate - For LM Studio and OpenAI compatible providers, it's usually /v1/chat/completions
- Confirm that the selected model and template are compatible:
Ensure you've chosen the correct model in the "Select Models" option Verify that the selected prompt template matches the model you're using
If you're still experiencing issues with QodeAssist, you can try resetting the settings to their default values:
- Open Qt Creator settings
- Navigate to the "Qode Assist" tab
- Pick settings page for reset
- Click on the "Reset Page to Defaults" button
- The API key will not reset
- Select model after reset