Posts

Make Input/Output operations from Linux user space

Image
Input/Output operation are made with special x86 instructions. This mean this interface exist only in x86 systems and is not available in ARM platforms. The operation consist in send or receive data to/from special "registry" called port and is frequently used for a lot of common tasks.

Qt: Get click event from button inside QTableWidget cell

Image
QTableWidget is a very flexible control allowing to manage various type of widgets inside each cell. However some widgets like button require an immediate action in consequence of click event. Insert a button inside a table cell is very easy but we need a way to get the click event since there will be a button for each new row in the table.

Qt: Using custom Style Sheet property

Image
Qt Style Sheet is a great way for quickly set the appearance of GUI controls using CSS style properties. There is a large set of Qt Style Sheet properties available for every type of widgets. However, in case you need to use this same way for set a property non available in the standard set, here a small example about how to do it.

Qt: Sidebar Qt Creator style

Image
Very simple tutorial about how to develop a dark sidebar like the Qt Creator tool. This is my solution based to stylesheet but same result can be reached in a lot of other ways. However I think this will get a good result with minimal efforts.

Clear console screen in Windows and Linux

Image
In case of develop of a console mode application it could be quite frequently to clear all the console screen for prepare new output. Here some examples of codes for clear screen in both operating systems.

Set console cursor position in Windows and Linux

Image
In console mode the typical need for set cursor position would be to "update" data in the same fixed position creating a refresh effect. This requirement need to set the cursor in the same point every time and start print characters. Each new print will overwrite the old data and this will create the dynamic update effect.

Set window icon in Windows console application

Image
Console application is a special Windows interface that doesn't need any GUI window since show only a console prompt as input. Each MS-DOS executable or batch file is automatically executed using this special mode. However is possible to develop a pure Windows application using this modality.