Skip to content

Sunday, 24 August 2025

 

Project Structure of Virtual Environments Created with virtualenv or venv

When we create a Python virtual environment, the system automatically generates a complete directory structure to isolate project dependencies. As shown in the image, the venv1 virtual environment contains several core directories, each serving specific functions.

Core Directory Overview

The virtual environment's root directory contains four main directories: bin, include, lib, and lib64, along with an important configuration file pyvenv.cfg. This structure design mimics the layout of system-level Python installations, ensuring environment integrity and independence.

bin Directory: Executable File Hub

The bin directory is the execution center of the virtual environment, containing all executable files and scripts. The most important among these are various activation scripts, such as activate.csh, activate.fish, and activate.ps1, which correspond to different shell environments. When you execute source bin/activate, you're actually running these scripts to modify environment variables.

Additionally, this directory contains symbolic links to the Python interpreter, such as python, python3, and python3.12, all pointing to the same Python interpreter instance. Package management tools pip, pip3, and pip3.12 are also located here, ensuring that packages installed in the virtual environment don't affect the system-level Python environment.

include Directory: Header File Repository

The include directory primarily stores Python header files, particularly the C API header files in the python3.12 subdirectory. These files are crucial when compiling Python packages containing C extensions, such as numpy, scipy, and other scientific computing libraries. The virtual environment provides copies of these header files to ensure compilation process consistency.

lib Directory: Core Library Repository

The lib directory is the core of the virtual environment, containing the actual files of Python standard library and third-party packages. The site-packages folder in the python3.12 subdirectory is where all packages installed via pip are stored. This directory's isolation ensures that dependencies between different projects don't conflict with each other.

lib64 Directory: Architecture Compatibility Support

lib64 is typically a symbolic link pointing to lib. This design is primarily to support the library file lookup mechanism for 64-bit systems. In some Linux distributions, the system searches both lib and lib64 directories, and the symbolic link ensures compatibility.

pyvenv.cfg: Environment Configuration Core

The pyvenv.cfg file is the configuration core of the virtual environment, recording the environment's basic information, including the Python interpreter path, version information, and whether system site-packages are included. This file determines the virtual environment's behavior mode.

Python Interpreter's System Environment

According to the image, this is a Python 3.12.3 Linux environment, showing the Python interpreter's module search paths through sys.path.

First is the /usr/lib/python312.zip path, which represents Python's standard library compressed package. This is an optimization strategy where Python packages core standard library modules into a zip file to improve loading speed and save disk space. When importing standard library modules like os, sys, and json, the Python interpreter first searches in this compressed file.

The next /usr/lib/python3.12 directory is the main installation location for Python's standard library. This contains all standard library modules written in pure Python, as well as some configuration files and auxiliary scripts. This directory's structure reflects Python's module organization approach, containing complete implementations of packages such as collections, concurrent, and email.

The /usr/lib/python3.12/lib-dynload directory specifically stores dynamically loaded extension modules, which are typically modules written in C or C++ and compiled into shared libraries. These extension modules provide Python with the ability to interact with the underlying system, including file system operations, network communication, mathematical calculations, and other performance-critical functions.

In package management, the /usr/local/lib/python3.12/dist-packages directory plays an important role. This is the storage location for system-level installed third-party packages, typically installed through system package managers or pip packages installed with administrator privileges.

Finally, the /usr/lib/python3/dist-packages directory is another storage location for third-party packages, usually containing Python packages installed through Linux distribution package management systems. This design allows system package managers and Python package managers to coexist harmoniously, avoiding dependency conflicts.

This directory structure design reflects several important principles of the Python ecosystem. First is modular and layered management, where different types of modules are clearly separated into different directories. Second is the priority mechanism, where Python searches these directories in the order of sys.path, ensuring correct module loading behavior. Finally is package management flexibility, supporting multiple installation methods and management strategies.

System Environment Changes After Switching to Virtual Environment


When we activate a virtual environment, the Python interpreter's module search paths undergo fundamental changes. The comparison in the image clearly shows the differences in sys.path before and after virtual environment activation, revealing the sophisticated design of the virtual environment isolation mechanism.

When the virtual environment is not activated, sys.path follows the standard system-level path structure, with the Python interpreter searching for modules according to established priority order. However, once the source bin/activate command is executed to activate the virtual environment, the system cleverly inserts virtual environment-specific paths at the beginning of the sys.path list.

The most significant change is the addition of /home/zjh/test_venv/venv1/lib/python3.12/site-packages to the first position of the search path. This seemingly simple adjustment is actually the core of the virtual environment isolation mechanism. Python's module search follows the "first found, first used" principle, so when the virtual environment's site-packages directory is at the front of the search path, any packages installed in the virtual environment will be loaded preferentially.

This path priority reordering creates an elegant hierarchical overlay system. If you install a specific version of a package in the virtual environment, such as Django 4.2, while the system-level environment has Django 3.2 installed, then with the virtual environment activated, the Python interpreter will prioritize using Django 4.2 from the virtual environment. This mechanism ensures dependency precision and predictability.

It's worth noting that the virtual environment doesn't completely isolate system-level Python paths but adopts a more pragmatic approach. System-level paths, such as /usr/lib/python312.zip and /usr/lib/python3.12, remain in the search path, but with reduced priority. This means projects in the virtual environment can still access the Python standard library and system-level installed packages, but will prioritize versions from the virtual environment.

This design philosophy reflects the inclusiveness and practicality of the Python ecosystem. The standard library, as Python's core component, should remain accessible in all environments, while third-party packages achieve project-level isolation through virtual environments. Developers don't need to worry about reinstalling standard library modules like os and sys in virtual environments, while being able to precisely control project's third-party dependencies.

From a technical implementation perspective, this path management strategy brings another important advantage: high efficiency of environment switching. Activating and deactivating virtual environments is essentially just dynamic modification of sys.path, without requiring copying or moving large amounts of files. This allows developers to quickly switch between different project environments without significant performance overhead.

Runtime Virtual Environment Switching Comparison for Different Python Versions

Based on the significant architectural changes in Python 3.8, virtual environment switching shows distinct watershed characteristics in technical implementation:

Fundamental Restructuring of Initialization API

The PyConfig system introduced in Python 3.8 completely changed the interpreter initialization paradigm. Before 3.8, virtual environment switching relied on relatively simple but crude global variable setting methods, configured through functions like Py_SetProgramName and Py_SetPythonHome. While this approach was intuitive, it lacked fine-grained control capabilities and was prone to configuration conflicts and inconsistent states.

The post-3.8 PyConfig system provides a structured configuration management approach, allowing developers to precisely control every initialization parameter of the interpreter. The new system implements type-safe configuration setting through functions like PyConfig_SetBytesString, significantly reducing the possibility of configuration errors. However, this fine-grained control also brings significant complexity increases, requiring developers to understand and manage more configuration options.

Evolution of Path Management Mechanisms

Pre-3.8 versions mainly relied on environment variables and runtime Python code to manage module search paths. The advantage of this approach is high flexibility, allowing dynamic modification of sys.path through Python code execution. The disadvantage is the difficulty in controlling the timing of path settings, easily leading to path priority confusion issues.

Post-3.8 versions allow precise setting of module search paths during the initialization phase, through mechanisms like config.module_search_paths_set and PyWideStringList_Append, achieving more strict path control. While this approach improves the determinism of path management, it also increases implementation complexity, particularly in string encoding conversion and memory management.

Enhanced Configuration Isolation

Early versions' configurations were mainly managed through global variables and environment variables, with relatively weak configuration isolation between different virtual environments. Environment variable modifications could affect the entire process's behavior, easily causing unexpected side effects. The post-3.8 PyConfig system implements better configuration isolation, with each interpreter instance having independent configuration state. This design reduces mutual influence between different virtual environments, but also requires developers to more carefully manage configuration object lifecycles.

Friday, 22 August 2025

Integrate KTextEditor into Cantor(2)

Over the past few months, I’ve been working on an important refactor in Cantor: migrating the editor for command entries from our in-house QTextDocument implementation to the powerful KTextEditor framework. In my previous update, I described how Phase 1 laid the foundation—command cells were migrated to use KTextEditor::View, enabling basic syntax highlighting and a modern editing experience.

Today, I’m excited to share that Phase 2 is now complete! With this milestone, the migration of command entries to KTextEditor is fully in place, ensuring that all existing functionality works smoothly without regressions. This achievement provides a solid foundation for future enhancements while keeping Cantor stable and reliable for everyday use.

What’s New in Phase 2

With Phase 2 now complete, command entries are fully integrated into KTextEditor. Along the way, we introduced three major upgrades to Cantor’s core architecture, paving the way for a more consistent, powerful, and future-ready user experience.

🔹 Unified Highlighting Framework

All syntax highlighting in Cantor is now powered by KSyntaxHighlighting, the same robust engine behind Kate and KWrite. This change ensures that every backend (such as Python, Maxima, R, Octave, etc.) benefits from a consistent, accurate, and highly reliable highlighting system.

Previously, each backend shipped with its own ad-hoc rules that were difficult to maintain and often inconsistent in style. With the new centralized approach, Cantor handles highlighting uniformly, not only providing a smoother user experience but also laying the groundwork for future support of custom themes and user-defined keywords.


🔹 Unified Completion Infrastructure

Code completion has likewise been consolidated into a common framework coordinated through KTextEditor. In the past, each backend had its own incomplete and sometimes inconsistent completion logic. Now, all completion requests are handled in a unified, predictable manner, with backend-specific intelligent suggestions seamlessly integrated.

The result is less duplicated code, easier maintenance, and—most importantly—a more cohesive user experience. Whether you are writing Python scripts or Maxima formulas, code completion now behaves consistently, making Cantor feel smarter and more reliable.


🔹 Reduced Code Redundancy

By adopting KTextEditor as the core for command entry editing, we eliminated a significant amount of custom code that had been written in Cantor over the years to handle code completion and highlighting for the different supported languages.

This streamlining improves maintainability, reduces potential bug risks, and makes Cantor’s codebase more approachable for new contributors. Developers no longer need to reimplement low-level editor features, allowing them to focus on advancing high-level functionality. In short: less boilerplate, more room for innovation.


Functional demonstration: new and old comparison, take a look!

Thanks to the new KSyntaxHighlighting backend, we can now temporarily change the theme of command entries, demonstrating future possibilities.

Please note that this is currently a preview feature; global “sheet themes” (applying themes uniformly to the entire sheet,) are our next steps.

  • Breeze Dark

  • Github Dark

  • Breeze Light

By integrating KTextEditor, Cantor now provides a unified and reliable code completion experience for all backends (such as Python, R, and Maxima).

Cantor also supports consistent multi-cell handling, with themes and syntax highlighting applied uniformly.

Why This Matters

This migration is not just a technical change under the hood—it directly impacts how Cantor evolves:

  • Stability first: by ensuring no regressions during the migration, users can continue to rely on Cantor for daily work without disruption.
  • Consistency across backends: highlighting and completion now feel the same, no matter which computational engine you choose.
  • Future-proof foundation: less redundant code and more reliance on KDE Frameworks means Cantor can keep pace with new features in KTextEditor and the broader KDE ecosystem.

What’s Next

With command entries now fully migrated, the door is open for exciting new improvements:

  • Theming support: enabling custom color schemes and styles, giving users the ability to tailor Cantor’s appearance to their preferences.
  • Vi mode integration: bringing modal editing from Kate into Cantor.
  • Spell checking: powered by Sonnet, useful for Markdown and explanatory text inside worksheets.
  • Smarter backend completions: richer suggestions, function signatures, and inline documentation.
  • Performance work: optimizing for very large worksheets and heavy computations.

Theming support (planned)

For now, Cantor will keep the Default theme, which uses the desktop palette. This preserves the familiar look and behavior.

Next, we plan to introduce a Worksheet Theme setting. Users will be able to:

  • Stay with Default (desktop palette, as before), or
  • Choose a theme from KTextEditor/KSyntaxHighlighting, just like in Kate.

The selected theme will apply consistently across the worksheet—including command entries and results—for a unified appearance. Instead of relying on hardcoded colors or the system palette, Cantor will use the color roles provided by KTextEditor and KSyntaxHighlighting.

This approach avoids performance overhead from repeatedly reading theme files, ensures instant updates when switching themes, and lays the foundation for richer customization in the future—such as clearer distinctions between prompts, results, and errors, all within a consistent global style.


Wednesday, 20 August 2025

AI Coding with Qt: Qt AI Assistant for Qt Creator

The integration of artificial intelligence into software development environments has rapidly evolved, and Qt Creator is no exception. With the introduction of the Qt AI Assistant by Qt Company, developers working with Qt Creator now have access to AI models through the IDE. This post provides an introduction to the Qt Creator plugin.

This is part 1 of an ongoing series about AI coding with Qt.

What is Qt AI Assistant?

Qt AI Assistant is a commercial plugin for Qt Creator to bring current AI models to the IDE. Features provided by the plugin include

  • Code completion for multiple languages (QML, C++, Python, Bash, etc.)
  • Contextual chat with your codebase, enabling explanations, code generation and code review
  • Automated test case generation, particularly tailored for QML and Qt-specific workflows
  • Model choice based on languages (QML vs other languages) and task (chat vs code completion)

This is a step up from the existing GitHub Copilot support in Qt Creator that was focused on code completion only.

Completing Qt AI Assistant is a publicly available set of models by Qt Group. The models are based on CodeLlama and are fine-tuned for usage with Qt 6 QML. They are not included with the plugin but need to be set up manually using Ollama.

Setting Up Qt AI Assistant

The setup process for Qt AI Assistant is more involved than some other AI coding tools. The plugin is currently available as part of the commercial Qt distribution. Installation requires enabling the appropriate extension repository within Qt Creator and activating the plugin. Once installed, configuration is necessary to connect the plugin to a large language model (LLM) provider.

Supported LLMs include OpenAI (ChatGPT), Anthropic (Claude), Google (Gemini), and self-hosted models via Ollama. For OpenAI integration, developers must use the OpenAI developer platform to generate an API key, which is different from having an account for ChatGPT. This API key is then entered into the plugin’s settings within Qt Creator. Other models require similar setup using URLs and credentials, depending on the provider or the self-hosting method.

More information is in this video linked at the bottom of this blog post.

Features in Practice

Code Completion and Chat

The plugin distinguishes between code completion suggestions as you type and prompt-based interactions, such as asking for code explanations or generating new code. For QML, a specialized Code Llama 13B QML model can be used. For other languages general purpose models are employed.

The chat interface allows developers to highlight code and request explanations or modifications. For example, selecting a block of QML or C++ and asking the assistant to "explain the selected code" yields a detailed, context-aware explanation.

Test Case Generation

A notable feature is the ability to generate test cases from selected QML code. While the generated tests may require manual refinement, this automation can accelerate the initial setup of unit tests and reduce repetitive work. The plugin’s approach is to copy relevant code into the test, which may not always result in optimal reuse, but provides a useful starting point.

Model Choice

Developers can choose between different LLMs to use for the chat and review vs the code completion scenario. For QML model choice is separate, and offers including the fine-tuned models provided by Qt Company. This flexibility extends to hosting options, supporting both cloud and local deployments, depending on organizational needs and privacy considerations.

Further Resources

For a detailed walkthrough and live demonstrations, watch the following episodes of "The Curious Developer" series:

Additionally, the official Qt AI Assistant product page provides up-to-date information on features and availability: https://www.qt.io/product/ai-assistant.

Outlook

Future posts in this series will consider alternative coding tools useful for Qt and will bring the newest developments of the tools we mention here.

The post AI Coding with Qt: Qt AI Assistant for Qt Creator appeared first on KDAB.

Monday, 18 August 2025

Hello all,

I would like to show you my first QtCreator plugin. It is an all-in-one window to test Qml Code.

How often do you run into issue about QML code; not doing exactly what you want ?

Demo:

 

 

Examples demo:

 

Here it a simple tool to test quickly some QML code. No need to create a new Test Project.
Open the plugin, type or copy/paste your code, do some changes until it does what you want.

It is mostly inspired from some Qml online site, but it is available directly into QtCreator.

 

Git repo: https://github.com/obiwankennedy/QmlSampleEditor

Download: https://github.com/obiwankennedy/QmlSampleEditor/actions/runs/

The Kdenlive team is happy to announce the release of version 25.08.0 packed with over 300 commits and fixing more than 15 crashes. This release has no major shiny new features, just a ton of bug fixes and lots of polishing to give you a pleasant editing experience in the summer heat.

Interface and Usability

Mixer

Redesign of the audio mixer bringing levels with clearer visuals and thresholds. We also did some code refactoring and cleanup. This change fixes issues with HiDPI displays with fractional scaling.

Screenshot of <nil>
Screenshot of <nil>
Screenshot of <nil>
Screenshot of <nil>

Titler

This release the titler received some much needed love like improved SVG and image support with ability to move and resize items, added center resize with Shift + Drag, and renamed the Pattern tab to Templates and moved the templates dropdown to it:

Other fixes include:

  • Added timecode widget with ability to drag to seek in the Titler,(Shift+drag for 1 frame, CTRL+drag for fast seek) Fix issues when resizing images would also moves them
  • Fix titler selection on create / resize object
  • Fixed an issue where the titler's panel width was consuming half the screen
  • Save and restore the panel width on reopening
  • Fix title thumbnail not updating in timeline after change

Scopes

Improved Scope styling by using system palettes for better theme integration as well as bug fixes in artifacts on high zoom level and paint modes. Compare the old styling on the left side with the new styling on the right:

Screenshot of <nil>
Screenshot of <nil>
Screenshot of <nil>
Screenshot of <nil>

Subtitles and Speech-To-Text

  • Require shift + drag of a subtitle clip to create a new layer
  • Make the subtitle edit widget resizable to adapt to lower resolutions
  • Fix crash dropping media file on subtitle track
  • Subtitle code refactoring
  • Fix subtitle layer name width
  • Fix subtitles showing on the top layer rather than appearing in lower layers on project loading.
  • Fix Whisper STT using Python 3.13
  • Whisper: disable translation when the Turbo model is selected
  • Fix Vosk STT producing bad subtitles

Markers and Guides

Guides and Markers got a major overhaul this release to improve the project organization.

  • Clicking a marker in the list now always selects it in the timeline
  • When adding a new marker, it’s automatically selected in the guides list
  • Selecting a guide in the timeline also highlights it in the guides list
  • New option to show thumbnails in the markers list dialog
  • Added a “Show markers for all clips in the project” toggle to display markers in other sequences
  • Consistently use bookmark icon for guides/markers
  • Improves Project Notes integration
  • Render dialog now updates correctly when sequence offsets change
  • Sequence timecode offsets now propagate to the timeline ruler, monitor, and guides list
  • Guides are correctly adjusted when changing project profile to match a clip profile

Project Notes

image

Some highlights include: improve icons, automatically convert typed timecodes to links when pressing enter, fix pasting text with multiple lines, notes can create guides and markers directly, and the widget has improved icons and text handling

Monitors

  • Add handle to rotate an item using the Transform effect in the monitor
  • Fix rotoscoping shape not matching selection in monitor
  • Fix monitor overlay for Obscure and Alpha Shape effects
  • Fix Transform monitor tool resizing when rotated
  • Fix pattern/lines overlay of the project monitor misaligning if clip changes while zoomed in
  • Improved monitor snapping: added back snapping when resizing for non-rotated frames, snapping when moving a rotated frame, and added snapping support for all edges when moving instead of only top-left
  • Change Timecode color of active Monitor
  • Make sure playhead is always on top of indicators
  • Make transform effect monitor grid setting apply to both monitors
  • Fix keyframe in monitor not correctly reported on clip selection
  • Adjust monitor timecode for sequence clips with timecode offset
  • Monitor code cleanup

Video Processing

We've added work on rendering, encoding, decoding, and transcoding such as:

Decoding

  • Added Enable Hardware Decoding option in the Config Wizard in preparation for future hardware acceleration features

Rendering / Encoding

Screenshot of <nil>
Screenshot of <nil>
  • Added power management option to disable sleep while rendering and playing
  • Added Nvidia 10 bit x265 encoding
  • Added 10 bit export profiles in the render dialog (Do note that it will be converted to 8 bit when using compositing or non avfilter effects)
  • Fix image sequence render incorrectly reported as failed
  • Ensure audio checkbox is disabled if rendering to an image sequence
  • Fix possible locale issue on render in Mac/Windows
  • Added ability to show log files in render dialog Job Queue tab
  • Added option to keep log files in the render dialog options
  • Replace AV1 profile with faster SVT-AV1 and added preset option to control quality and speed
  • AddedSVT-AV1 to codecs which use CRF option
  • Fix canceling a render would leave Kdenlive in an unstable state
  • Warn when exiting Kdenlive when render jobs are running, allow to terminate all jobs
  • Update render dialog guides when sequence offset changes
  • Display timecode offset in render dialog

Under the hood

  • Reduced memory consumption of the background removal (SAM2) feature
  • Added more code tests to improve stability
  • Improved packaging in MacOS, Windows, Snaps and Flatpak
  • Cleanup plugins configuration page
  • Fix SAM2 use system packages hidden
  • Allow installing specific CUDA version for Whisper and SAM2
  • Fixes to undo/redo operations
  • OpentimelineIO (OTIO) fixes
  • Drop mediainfo dependency now that we can directly read timecode from MLT

Fixed platform specific issues:

  • MacOS: Allow opening project files by double click (3 year old bug)
  • Windows: Typewriter effect crash in Titler
  • AppImage: Fix missing / corrupted font making App unusable on Ubuntu 24.04

Upcoming events

image

The team will be in Berlin this September for two events. First, the Kdenlive Sprint which will include a community meetup on the 4th of September (stay tuned for more details) and on the 7th of September we'll be at Akademy, where Jean-Baptiste will give a talk about our fundraiser experience. Join us!

Give back to Kdenlive

Releases are possible thanks to donations by the community. Donate now!

Need help ?

As usual, you will find very useful tips in our documentation website. You can also get help and exchange your ideas in our Kdenlive users Matrix chat room.

Get involved

Kdenlive relies on its community, your help is always welcome. You can contribute by :

  • Helping to identify and triage bugs
  • Contribute to translating Kdenlive in your language
  • Promote Kdenlive in your local community

For the full changelog continue reading on kdenlive.org.

Today we are announcing the availability of the minor patch release 2.12.1. This release contains minor improvements and bug fixes only. The fixes are distributed over many different areas of the application and we recommend everybody update to this patch release which is available from our download page.

The full list of fixes included in this patch release is as follows:

  • Fix using default font for axis title
  • Fix build with system QXlsx (!693)
  • Fix build with system QADS 4.4 (!694)
  • Fix crash on import when no projects opened (BUG 503800)
  • Save rotation of axis title separately for x and y axis
  • Fix disappearing axis ticks (#1146)
  • Fix crash when creating the data spreadsheet for analysis curves (BUG 504662)
  • Fix crash when aspect is added and all docks in content area are hidden (BUG 504794, 502043)
  • Fix crash when column or row was added to spreadsheet from toolbar and no column or row was selected (BUG 504839)
  • Fix issue when the statistics spreadsheet was not shown if the spreadsheet was a child of workbook
  • Fix issue which caused the context menu of an aspect to not be shown after being re-parented
  • Handle Windows logical font “MS Shell Dlg 2”
  • Fix crash when deleting a live-data source with missing source file
  • Parser: Remove not required function and reuse function instead of copying (BUG 506925)
  • Fix the export of spreadsheets to SQLite, wrong format was selected internally in the export dialog
  • Fix the export to SQLite of text values in the spreadsheet containing single quotes
  • Fix FITS import and export issues
  • Don’t show any error messages and NaN values in the process behavior chart if no column or an empty column was selected
  • Remove unwanted entries on the undo stack that were created when modifying properties of the process behavior and run charts
  • Improve the quality of the fit model preview in the properties explorer and formula view in the random values dialog on hi-dpi screens
  • Initialize the parameters for the baseline subtraction with reasonable values on first startup and improve the appearance of the preview plot
  • Fix save/load of the background color for the center value label in the process behavior chart

In the area of small UX-improvements, we added the Shift+Enter shortcut in the Properties Explorer for all analysis curves (fitting, smooth, etc.) which allows to quickly re-calculate the results using the same shortcut as in the notebook. Furthermore, we improved the tab-order and layouts in multiple properties widgets.

In parallel, we are also working on the new features and improvements that will arrive in the next major release which will come with multiple big and highly awaited features. We’ll introduce these features in upcoming blog posts. Stay tuned!

Is that really so? PyCups3 is intelligent?

Well, short answer is YES. It is intelligent.

Damn, sweetheart, you made an AI for PyCups?

Not everything that’s intelligent is an AI.

An imaginary conversation, between me and my girlfriend. Now, what’s the twist here is, PyCups3 is actually very very intelligent. So, from my last blog post, I detailed how, PyCups2 got lost due to the lack of upgrades and implmentation of new APIs.

Representative and generated

So long of GSoC and No blog yet? Why Soumya?

Yeah, yeah, I know. It’s been a while, and no blog posts yet. But hey, between wrestling with CFFI + C + Python and libcups with its 150+ APIs, blogging kind of took the back seat. But enough excuses - let’s dig into what’s been cooking.


A little history (with C in it)

Back in the day (almost 15 years ago!), Tim Waugh wrote the first version of pycups as a C extension module for Python. That worked well, but like all old code, it aged… let’s just say, not like fine wine. After Tim, Zdenek took over as maintainer, but with multiple projects of OpenPrinting and other projects in the mix, there wasn’t much room to modernize PyCups2 for him.

Welcome to the July 2025 development and community update.

Development Report

Text Tool Rework Progress

Another important piece of the Text Tool update has made it into the unstable nightly builds: Style Presets.

Screenshot showing the Text Properties docker's Preset tab with examples, and the Edit Style Preset dialog.
Style Presets allow you to save font settings and apply them quickly.

For making text bold, or a certain font at a certain size, or a huge list of settings tweaked just right, you can easily apply your favorite properties without having to remember them all. (MR!2403)

The QML Text Properties docker now uses the same custom slider-spinbox widgets as the rest of Krita, thanks to Wolthera and Deif Lou. (MR!2428)

Community Report

July 2025 Monthly Art Challenge Results

16 forum members took on the challenge of the "Cool Rides" theme. And the winner is… Cool Rides by @edgarej

Cool Rides by @edgarej

The August Art Challenge is Open Now

In the spirit of August's monthly challenge being unofficially dedicated to Krita's cybersquirrel mascot, winner @edgarej has chosen "Kiki's Summer Activities" as the theme. The optional challenge as chosen by runners-up @npc and @Mythmaker is to give Kiki a pet companion. What does Kiki like to do to beat the heat? You decide!

Best of Krita-Artists - June/July 2025

This month's Best of Krita-Artists Nominations thread received 13 nominations of forum members' artwork. When the poll closed, the moderators broke a five-way tie for second place, and these five wonderful works made their way onto the Krita-Artists featured artwork banner:

On the Road Again by @Yaroslavus_Artem

On the Road Again by @Yaroslavus_Artem

Lucy CyberPunk Edgerunner Fanart - P.2025058 by @ynr_nohara

Lucy CyberPunk Edgerunner Fanart - P.2025058 by @ynr_nohara

Medieval Table by @Ape

Medieval Table by @Ape

Summer Retreat by @Gurkirat_Singh

Summer Retreat by @Gurkirat_Singh

Mountain Sunset - Master Study Bohdan Saliy with Memileo Impasto Brushes by @TaleOfACat

Mountain Sunset - Master Study Bohdan Saliy with Memileo Impasto Brushes by @TaleOfACat

Ways to Help Krita

Krita is Free and Open Source Software developed by an international team of sponsored developers and volunteer contributors. That means anyone can help make Krita better!

Support Krita financially by making a one-time or monthly monetary donation. Or donate your time and Get Involved with testing, development, translation, documentation, and more. Last but not least, you can spread the word! Share your Krita artworks, resources, and tips with others, and show the world what Krita can do.

Other Notable Changes

Other notable changes in Krita's development builds from July 16, 2025 - August 18, 2025.

Stable branch (5.2.12-prealpha):

  • Palette Docker: Fix crash with add swatch dialog. (bug report) (Change, by Wolthera van Hövell)

Unstable branch (5.3.0-prealpha):

  • Fill Tools: Add option to Include Current Layer in color labels reference mode. (Change, by runch r.)
  • Symbol Libraries Docker: Fix symbol thumbnails being pixelated, and add a thumbnail-only view mode. (Change, by Agata Cacko)
  • Freehand Path Tool: Remember Tool Options. (Change, by Agata Cacko)
  • Animation: Switch to active keyframe when inserting/removing hold frames. (CCbug report) (Change, by Emmet O'Neill)
  • Animation: Fix rendering GIFs that don't have the .gif file suffix. (bug report) (Change, by Emmet O'Neill)

Nightly Builds

Pre-release versions of Krita are built every day for testing new changes.

Get the latest bugfixes in Stable "Krita Plus" (5.2.12-prealpha): Linux - Windows - macOS (unsigned) - Android arm64-v8a - Android arm32-v7a - Android x86_64

Or test out the latest Experimental features in "Krita Next" (5.3.0-prealpha). Feedback and bug reports are appreciated!: Linux - Windows - macOS (unsigned) - Android arm64-v8a - Android arm32-v7a - Android x86_64

Sunday, 17 August 2025

Intro

After getting the Selection Action Bar into a working state over the past few weeks, this week I focused on creating documentation and refactoring code to improve clarity, maintainability and make sure other contributors can build off of this work without confusion.

Progress

Documentation

One of the most important parts of contributing to open source is writing about what you have built. Krita's documentation is maintained in a dedicated repository. This week I began drafting a merge request to add a page with instructions and UI images under the reference manual tools section.

My aim is to ensure that any Krita user can easily understand the feature through both the documentation and the code.

Refactoring

Another important part of contributing to open source is writing code that is easy to read and maintain for future contributors. My aim was to improve the structure of the code without changing its behavior. I did this by reducing duplication, using descriptive variable names, and replacing magic numbers with named constants.

Instead of manually creating and connecting each button, I introduced a helper function that takes configuration data (icon, tooltip, slot) and handles the setup in one place.
Create Button Helper

I also applied an extract method refactor, grouping the buttons and toolbar UI logic into their own functions.
setupButtons and drawActionBarBackground

Conclusion

This week reinforced the importance of writing both documentation and clean code. I learned that documentation ensures users understand your work, while refactoring ensures the code is clear and easy for contributors to improve.

Heading into the final week of GSoC, I am ready to share my contributions and overall learnings. My focus will be on gathering feedback and finalizing the feature!

Contact

To anyone reading this, please feel free to reach out to me. I’m always open to suggestions and thoughts on how to improve as a developer and as a person.
Email: ross.erosales@gmail.com
Matrix: @rossr:matrix.org