Whiteley Research Incorporated


Linux, MacOS Installation
IC Design Software for Unix/Linux and Windows
Whiteley Research Inc., 456 Flora Vista Avenue, Sunnyvale CA 94086    wrcad.com
Graphics Toolkit Selection: GTK and Qt

IMPORTANT NOTE: Qt is NOT open source! Qt is available free of charge for non-commercial use in open source projects. When this is not the case, potential users must investigate and comply with the Qt licensing terms.

The Xic, WRspice and other graphical programs have historically used the GTK-2.0 toolkit. This, however, is rather old and obsolete. After an abortive effort to migrate to GTK-3.0 (which is also obsolete but less so) it became clear that a major change of direction was required, and a huge effort was initiated to switch to the Qt toolkit. This is done, but use will likely uncover things that need fixing.

Status as of September 17, 2024:

  • The GTK-2.0 toolkit remains as the "reference" for now.
  • The GTK version should be considered as approaching end of life.
  • Qt releases are equivalent and users are encouraged to try them.
  • New features will be developed in the Qt branch, and may not be ported to the GTK branch.
  • The build and packaging systems can generate and contain separate binaries for GTK2, Qt-5, and Qt-6 toolkits. This is temporary, as GTK2 will go away at some point.
  • Pre-built packages contain GTK2 and Qt binaries.
Installing Qt

To use the Qt versions, the Qt toolkit must be installed.

Linux
Qt-5 is used exclusively under Linux, and there is a strong possibility that this is already installed, but if not it will have to be installed from the repository for your operating system. Some example commands to do this are given below. Note that this will almost certainly require root access.

Ubuntu, Debian
apt-install qt5-qtbase-devel
CentOS 7/8, Rocky 8, AlmaLinux 8, Red Hat 8, Fedora 40
dnf install qt5-qtbase-devel

Windows
Windows uses Qt-6, and the appropriate version must be installed into the MINGW subsystem. The command to do this is

pacman -S mingw-w64-x86_64-qt6

Apple
Apple will also use the Qt-6 toolkit, the following terminal commands will accomplish installing the toolkit from MacPorts.

sudo port -v selfupdate
sudo port install qt6
Switching between running GTK2 and Qt-based tools

You can switch between the two versions using a .xtrc file which is found either in the current directory or your home directory. You will need to create this file to use the Qt version. This is easily done with a text editor. If this file is not found, GTK2 is the default.

The .xtrc file contains a single line that looks like

grpref=GTK2

Note that there is no white space around the '=' character. The GTK2 is replaced by QT5 or QT6 when you want to run Qt. The 5/6 corresponds to the Qt version.

You can change which version to run by modifying the .xtrc file with a text editor. This will take effect the next time a graphical tool is started.

Copyright © Whiteley Research Inc. 2024