QT5 LinuxFB rotation for LCDs patch

I wrote up this patch as I needed to get a landscape display on a LCD which was actually intended for portrait (and so its resolution and framebuffer had to be setup for portrait, it was just physically oriented as landscape). This is a common problem for people using ILI9341/ILI9340 controllers found on cheapo TFT LCDs. These LCDs come setup for a portrait mode on the RGB interface with no option to change it, they do have an SPI interface where you can alter the settings but the display data must always be sent over SPI.

This other problem is going from QT4 to QT5, the transformation options previously available were removed with the old QWS system and now QT5 doesn’t have any way to rotate the image going to the framebuffer.

This patch improves the LinuxFB platform plugin to create an rotation option which can rotate the display by 90,180 and 270 degrees.

Usage is simple, simply append the rotation= parameter with a value of 0,90,180, or 270:

export QT_QPA_PLATFORM=linuxfb:fb=/dev/fb0:rotation=90

Or use it in the program launch args

-platform linuxfb:fb=/dev/fb0:rotation=90

You need to recompile qtbase to apply this. This was done against QT5.4 but I doubt the files being modified have changed since QT5 was released.

Download here: qt5.4_linuxfb_rotation.patch

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值