helloSystem / QKeySequenceOverride

Override the QKeySequence::toString() function in Qt to represent keyboard shortcuts with graphical symbols

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

QKeySequenceOverride

image

This repo contains a tiny bit (~30 lines) of C++ code which compiles to a .so file to dynamically override the QKeySequence::toString() function in Qt to represent shortcuts with graphical symbols similar to the Mac.

Instructions

On FreeBSD:

cd QKeySequenceOverride
mkdir build
./build.sh
env LD_PRELOAD=$(readlink -f build/libQKeySequenceOverride.so.1.0.0) menubar

LD_PRELOAD

The heart of this trick involves using LD_PRELOAD. For an explanation of this powerful feature of the dynamic linker, check out this writeup.

For more advanced LD_PRELOAD tricks check this out.

Credits

https://github.com/heavyimage/OverrideQtSplashscreen/

About

Override the QKeySequence::toString() function in Qt to represent keyboard shortcuts with graphical symbols


Languages

Language:Makefile 94.2%Language:C++ 4.9%Language:Shell 0.6%Language:QMake 0.4%