LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-08-2018, 06:43 PM   #1
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,277

Rep: Reputation: Disabled
Qt5 keybinds


I'm using qt5 from SBo and a minimal tiling window manager (spectrwm) and have noticed with some qt5 programs certain keybinds are missing. A common one is 'ctrl+q' for quitting the program.

One example is the new optional qt5 ui in RetroArch, looking at the code shows.

Code:
exitAction = fileMenu->addAction(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_FILE_EXIT), mainwindow, SLOT(close()));
exitAction->setShortcut(QKeySequence::Quit);
https://github.com/libretro/RetroArc...ui_qt.cpp#L277

And with some investigation this is supposed to be implemented in the DE and reportedly works in xfce and other DEs, see this link for details.

https://doc.qt.io/qt-5/qkeysequence....dard-shortcuts

Obviously this being missing in spectrwm is a feature, but it leaves the question, how is someone supposed to manually configure these keybinds? I've spent sometime looking without finding anything all that relevant.
 
Old 05-09-2018, 10:31 PM   #2
elcore
Member
 
Registered: Sep 2014
Distribution: Slackware
Posts: 496

Rep: Reputation: Disabled
Long time ago, before the centralized DE standards, it was solved by programs such as bbkeys. I think lumina does that with fluxbox-keys.
However, many (qt5) programs have their own schemes, like smplayer-qt5 can load *.keys file to import vlc keybinds, for example.
I guess manual keybinds could be a missing WM feature, missing feature in a program, or a missing program, depending on how you look at it.
Could be a missing feature in the toolkit, or if not, it could be a program that is unaware of toolkit feature.
 
Old 05-10-2018, 08:23 AM   #3
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,277

Original Poster
Rep: Reputation: Disabled
Is it correct that bbkeys and fluxbox-keys are similar programs to xbindkeys?

In this case my focus is specifically qt5 programs that use the standard qt5 platform dependent keybinds. Ideally these should be configurable in qt5 or alternatively the programs detect that the keybinds do not resolve and then offer fall backs, but I suspect fixing this in qt5 is not practical and fixing it in every program would be very tedious and I am not very familiar with c++ or qt5 code...

Unfortunately I am not sure that anyone that worked on qt5 every considered this use case and expects everyone to use a giant DE like gnome3...
 
Old 05-14-2018, 05:50 AM   #4
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: Slackware
Posts: 8,289

Rep: Reputation: 3366Reputation: 3366Reputation: 3366Reputation: 3366Reputation: 3366Reputation: 3366Reputation: 3366Reputation: 3366Reputation: 3366Reputation: 3366Reputation: 3366
Hmm... interesting.

The following link (which orbea must have already seen) seems to have a good explanation, and also suggests that setting QT_QPA_PLATFORMTHEME might work as a workaround.

https://github.com/zealdocs/zeal/issues/172

Last edited by dugan; 05-14-2018 at 05:58 AM.
 
1 members found this post helpful.
Old 05-14-2018, 08:06 AM   #5
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,277

Original Poster
Rep: Reputation: Disabled
No, I never found that one! Thanks!

Setting QT_QPA_PLATFORMTHEME=gnome for example seems to resolve this. I'll mark this as solved.
 
Old 05-14-2018, 08:16 AM   #6
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,277

Original Poster
Rep: Reputation: Disabled
Actually it seems I already have QT_QPA_PLATFORMTHEME=qt5ct in my environment to allow gtk+2 themes. I suppose these keybinds should be implemented in qt5ct!
 
Old 05-14-2018, 01:56 PM   #7
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: Slackware
Posts: 8,289

Rep: Reputation: 3366Reputation: 3366Reputation: 3366Reputation: 3366Reputation: 3366Reputation: 3366Reputation: 3366Reputation: 3366Reputation: 3366Reputation: 3366Reputation: 3366
If you have lxqt installed, this works well:

Code:
QT_QPA_PLATFORMTHEME=lxqt
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
qdvdauthor for Qt5 pmv Linux - Software 0 04-07-2018 06:45 PM
[SOLVED] qt5 and pathappend jr_bob_dobbs Linux From Scratch 1 10-14-2017 08:00 AM
problems with qt5-5.7.0 Toutatis Slackware 4 10-03-2016 07:32 AM
[SOLVED] Openbox Custom Keybinds Johnny_Metal Linux - Newbie 7 05-16-2016 01:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration