Saturday, 16 June 2018

Input Validation in QT

This post shows a form control widget that performs validation on its input. The invalid input is highlighted in red and the error message is display below the input. The input is validated in real-time (as the text is changed) when invalid the submit button is disabled and when valid it is enabled. The desired effect is shown below:

Saturday, 9 June 2018

Order Independent Transparency

Transparency in OpenGL is usually achieved using blending. Good looking results can be achieved by changing the blend function used and in the process we can avoid advanced techniques that require depth sorting.
In this post, I show how to achieve order independent transparency with python and OpenGL. The desired effect is shown below:

Saturday, 2 June 2018

Styling QT Applications: Button Tabs

This post demonstrates how to create custom tabs using QPushButtons in a QButtonGroup. The code below is self explanatory, the button group ensures that only a single button can be selected at one time. The buttons are made to look more like tabs using QT style sheet and the final result is shown below