Qt, UI and other stuff

Collection of useful stuff

CCS UI Toolkit, Taurus (20200819)

CCS UI Toolkit Introduction

This is part tutorial, part introduction to the CCS UI Toolkit. At this point it covers how to access the CCS UI Toolkit prototype (in the VM or preinstalled machine), how to install it in your own DevEnv machine, and the basics of Taurus. The document can be found here. This document is not a final product.

E-ELT, Qt, C++, WAF, Shiboken2 (20200819)

Widget Development

When new widgets are needed, a developer needs to provide them to the application as a library, but also to Qt Designer as a plugin. Also, bidings to Python are to be provided. This document describes how a set of new widgets are to be created for the E-ELT project, specially how the project is set up with WAF, the modules separation between widgets, plugin and bindings. You can read a draft version of it in here: link. This document is not a final product.

E-ELT, Qt, Python, PySide2, Shiboken2, WAF (20200731)

Qt Widgets Binding to Python

A document that describes how Shiboken2 works, and how it can be integrated into WAF custom script, can be found in this link. This document is not intended as a final product, as WAF integration is the desirable product. But is more of a lessons learned document, so that this expertise is not lost.

E-ELT, DevEnv (20200303)

DevEnv 2.1.19 and Qt issues

QtCreator (qmake and cmake based projects) is not using by default the compilers from E-ELT, which is devtoolset-7 lua module. We should force Qt either to use WAF, or to use those binaries as compilers.

Understanding the situation

Devenv virtual machines include two set of compilers. The ones that comes with the default CentOS 7.4 installation (GCC 4.9), and the ones used to compile software for E-ELT (GCC 7).

The default CentOS ones are installed in the standard path (/usr/bin). The ones for E-ELT are installed by NIX in /opt/rh/devtoolset-7.

When using LUA modules (module load gcc7), it will only set environment variables for CC, CXX, AR, LD.

QtCreator does not use these environment variable to figure out its compilers. It searches in the PATH for known compilers it supports. Since E-ELT compilers (gcc7) are not in the PATH, then it fails to find them.

WAF is not a supported build system by QtCreator. But Qt Creator allows us to set custom building and run procedures. WAF is very much self-contained, so it is easy to integrate it into QtCreator.

Kit Configuration

NOTE: This section “Kit Configuration” is only needed if you want to compile things without using WAF. Since WAF is in charge of doing the proper compiler and linker calls, Qt Creator (when using WAF) will never need to know the real Compiler.

On the other hand, if you just want to do a quick Qt example (without using WAF), then you will need to set this, because it would be then qmake or cmake the ones making the calls to the compiler and linker. There is no harm in doing this when using WAF.

To allow Qt to find the compilers used by WAF, use:
$ PATH=/opt/rh/devtoolset-7/root/bin:$PATH qtcreator.sh

Then click on “Manage Kits…” button (circled in red in the screenshot). A new dialog window will open called “Options” and click the Auto-detected “Desktop Qt” kit.

Under “Compiler”

  • In the “C” compiler select the option “GCC (C, x86, 64 Bit in /opt/rh/devtoolset-7/root/bin)”
  • In the “C++” compiler select the option “GCC (C++, x86, 64 Bit in /opt/rh/devtoolset-7/root/bin)”

In the “Debugger” compiler select the option “System GDB at /opt/rh/devtoolset-7/root/bin/gdb”

Click on the “Ok” button, in the lower-right set of buttons in the dialog window “Options”.

Build Settings

Run Settings

CCS UI Framework (20200213)

Taurus prototype

As part of the CCS UI Framework design, we have programmed a prototype based on Taurus. The prototype is actually a Taurus scheme plugin that implements one of the middleware being used in E-ELT. In this presentation the advances made in this area were shown. It includes a brief introduction to MVC Pattern, Taurus, and how Taurus uses the MVC patern. Then, code examples were shown. Later, a more detailed presentation on Qt and Taurus usa of Models was given.

Presentation (pptx, pdf). Taurus code examples (tar.gz). Qt QStandardItem based models examples (zip)