Another important task of software development is to create a good graphic elements for make the interface look better. Graphic texts, icons, logos and so on are all parts of a good product. If you, like me, are not so good in graphic design we need some help...

In case you are working with Qt Graphics View Framework you probably make use of the QGraphicsView method fitInView(). This function, based to the official documentation, scales the view matrix and scrolls the scroll bars to ensure that the scene rectangle rect fits inside the viewport. 

QGraphicsScene is a great Qt component allowing to develop full graphics applications (like game for example) in a very easy way. As additional feature is possible to insert a QWidget based object inside the scene through the QGraphicsProxyWidget item.


Qt have two main classes to use as button widget, QPushButton and QToolButton. These classes made the job in a very good way but both miss the word wrap feature. If the button width is not enough for show the entire button text the string is cutted out on sides and this is not a good effect. Word wrap feature allow the control to automatically move part of the text in a new line for allow full view.

In case you want to show your text labels a little more "beautiful" to see a little trick is to add shadow to text and create a 3D text like. In the CSS standard set exist a tag called text-shadow able to apply such effect automatically. Unfortunately this feature is not supported by the Qt QSS stylesheet set so we need to found another way.