Posts

QWebSocket synchronous communication

Image
QWebSocket can send or receive packet with text or binary contents. As all other Qt components everything works asynchronously. However, there may be cases where it is necessary to work asynchronously waiting for the reply to a given message before moving on. Here an example for a synchronous communication that you can use in your project.

QML: Emboss effect

Image
QML have some components allowing to draw a shadow over an item. The InnerShadow draw a shadow only in one side of the item, but for have the emboss effect we need to habe both sides with light/dark color. The solution is very simple, use two InnerShadow combined.

QML: CheckBox and RadioButton with description field

Image
Restarting from this post explaining how to add the word wrap feature to the CheckBox and RadioButton controls here will propose to add a description field under the main control text. This will be useful to give a short explanation concerning the use of the control itself.

Git on Windows and custom SSL proxy certificate problem

Image
Modern proxies, usually used on a companies, check each downloaded data for malicious code. For allow check of SSL connections the proxy provide a custom SSL certificate to use from inside company PCs. Use this custom certificate in a browser is a very easy operation since all modern browser can manage them by internally install the certificate. However with some other tool like Git the procedure is a bit more complicated.

Qt: Request Android app permissions

Image
Each Android app, based to the "interaction" with system, have to declare what resources need to access through some special info called permissions . Normally these permission are declared inside the AndroidManifest.xml and this was enough. However, from android version 23 (Marshmallow) and above some part of these permissions (classified as more "critical") have to be manually requested to the user who have to accept for authorize the app to use it.

QML: CheckBox and RadioButton with word wrap feature

Image
Standard QML CheckBox and RadioButton controls can be used in a very easy way but, at least until the current date, it have the problem if the text go over the parent control container is not automatically moved to the next line but is simply cutted out. This missing feature is called word wrap .

Linux: Translate virtual to physical addresses in user space

Image
Each memory allocated in a process use a special address system called virtual address. This is a special address used inside the process space. However, sometime, could be necessary to know the real physical address in system memory for different purposes in user space. Here a short snippet showing how to do.