Skip to content

Create custom themes for qBittorrent

Prince Gupta edited this page May 8, 2020 · 18 revisions

Introduction

This page contains the necessary information to get started developing custom themes for qBittorrent. They are supported since version 4.2.2.

What are .qbttheme files?

These are theme bundles for qBittorrent. They should contain all files required to support theming in qBittorrent and are packed using Qt's Resource Compiler. qBittorrent accesses files inside .qbttheme using Qt's Resource System. Currently, qBittorrent only searches for a stylesheet.qss file inside a .qbttheme file.

How to create your own theme bundles?

You can check out this Python script(here) for the easy creation of .qbttheme files.

At runtime, qBittorrent loads the stylesheet.qss file to support theming. stylesheet.qss is a Qt stylesheet, which is basically custom CSS for Qt. You can read more about Qt stylesheet syntax here. A reference is also available here. qBittorrent uses QResources::registerResource to use the bundle file, you can imagine it like QBittorrent extracts bundle file in a special path which is :/uitheme, so every file should be referenced accordingly f.e let's see we have to change the image QRadiaButtons indicator, so to reference a light/radio_button.svg that we had it inside our bundle file, we should reference it something like this

QRadioButton::indicator:unchecked,
QRadioButton::indicator:unchecked:focus
{
    image: url(:/uitheme/light/radio_button.svg);
}

Examples

  • To change Transfer List row colors based on the torrent state, one can add the following to their stylesheet.qss.
TransferListWidget 
{
  qproperty-downloadingStateForeground: limegreen;
  qproperty-forcedDownloadingStateForeground: limegreen;
  qproperty-downloadingMetadataStateForeground: limegreen;
  qproperty-allocatingStateForeground: #cccccc;
  qproperty-stalledDownloadingStateForeground: #cccccc;
  qproperty-stalledUploadingStateForeground: #cccccc;
  qproperty-uploadingStateForeground: #63b8ff;
  qproperty-forcedUploadingStateForeground: #63b8ff;
  qproperty-pausedDownloadingStateForeground: #fa8090;
  qproperty-pausedUploadingStateForeground: #4f94cd;
  qproperty-errorStateForeground: red;
  qproperty-missingFilesStateForeground: red;
  qproperty-queuedDownloadingStateForeground: #00cdcd;
  qproperty-queuedUploadingStateForeground: #00cdcd;
  qproperty-checkingDownloadingStateForeground: #00cdcd;
  qproperty-checkingUploadingStateForeground: #00cdcd;
  qproperty-checkingResumeDataStateForeground: #00cdcd;
  qproperty-movingStateForeground: #00cdcd;
  qproperty-unknownStateForeground: red; 
}

General

Troubleshooting

External programs

Search plugins

Themes

Translation


WebUI

WebUI API

State Version
Current qBittorrent >= 5.0
Previous qBittorrent v4.1.0 - v4.6.x
Previous qBittorrent v3.2.0 - v4.0.x
Obsolete qBittorrent < v3.2.0

Authentication

WebAPI clients

Alternate WebUI

Reverse proxy setup for WebUI access

WebUI HTTPS configuration


Linux


Development

Compilation

Common information for CMake

*BSD, Linux

macOS

Windows

Obsolete compilation guides

Clone this wiki locally