Skip to content

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

Notifications You must be signed in to change notification settings

helloSystem/QKeySequenceOverride

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

Stars

Watchers

Forks

Languages