Posts

Qt Snippet: QLabel with text shadow

Image
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.

Qt and Visual Studio: Qt5Core.dll not found error

Image
When I move a Visual Studio project from different PCs (using same version of Visual Studio) sometime it happen to get a very strange error running the executable from Visual Studio (with Qt Plugin installed).

Qt Snippet: Use QScroller with QScrollArea

Image
In case you are developing a Qt app for mobile device you'll have the "problem" to manage widgets that need to be scrolled for show data inside. In Desktop system this work is done by using scrollbars or the wheel mouse event but in mobile system you can not use same ways. Instead the touch event is the only way the user have to scroll your widget.

Compile QWebKit component for Android

Image
As announced Qt team ported Qt libraries to work on mobile system also but with some limitations. The most "important" limitation (in my opinion) is the choice to not include QWebKit (or QtWebEngine) component into mobile system library set. As replacement of this lack Qt team provide the QtWebView component that is a wrapper around the system native web browser engine.

Launch an app from Android shell terminal

Image
If you want to launch an Android app from shell command line terminal there is a simply command allow to do that but you have to know some info about the app you want to execute. The command is named am and is basically a command line interface to the system ActivityManager .

Qt Snippet: " Painter not active " error

Image
If you subclass a widget control and try to repaint the content by overriding the paintEvent() method you could experiment, for some specific type of Qt widgets, the error " Painter not active ". This error come up during program execution when try to create the QPainter object for draw the widget content.

Configure Android emulator to go through a proxy

Image
If you are developing an Android app and need the emulator to access Internet you can get the result in case of your network is under a proxy. The emulator interface doesn't have some GUI dialog allow to insert proxy params but there is a way to set these params by command line. This mean you have to manually launch the emulator instead of have it automatically started by the IDE.