Well, I think everything is said on the title : How does one define a new custom keymap (Either by redefining the whole keymap, or by calling programs like xmodmap in a .bashrc-like ? ) on Kde (Plasma) on Wayland ?
Since each client receive a virtual keyboard, I'm guessing there is no way to define a keymap in wayland in general, am I right ?
Related
I'm writing a GUI that runs on both Linux and Windows, and makes extensive use of the QListView class. I'd like to keep the look of the GUI consistent for users on both systems.
Out of the box, Qt uses different decorations for expandable/collapsible item icons on those systems. Is there any way, perhaps using a delegate, to replace the decoration with a custom set of icons?
If you are using Qt 5.* you can use the platform independent Fusion style. It looks pretty much the same on different platforms. Just add in your main.cpp :
qApp->setStyle("fusion");
I'm developing a Qt4 app and running it under gnome, but I would really like it to use a KDE system theme (Oxygen) and color scheme (Obsidian Coast). Unfortunately, the application doesn't seem to respond to changes in systemsettings.
I am at least able to get the app to use the theme I want programmatically by setting the QStyle:
QApplication app( argc, argv );
app.setStyle(QStyleFactory::create("oxygen"));
but I don't know of any similar approach for setting the color scheme, and this is kind of ugly anyway.
Interestingly, I've already developed some PyQt4 apps on this same machine and they pick up changes in systemsettings just fine. I'm not really sure why a C++ Qt4 app would behave differently.
One more note: I've noticed that changing the window appearance via the gnome dialog will affect my C++ qt window's appearance - so perhaps Gnome is overriding my KDE configuration somehow?
The only solution I've found is to let the environment do the work for you, as noted here: https://forum.kde.org/viewtopic.php?f=17&t=90720
A snip from the posts:
So you wish to start Amarok with a different colour scheme to the rest of KDE?
You can do this by having a different set of settings for it.
Open Konsole, and enter "export KDEHOME=$HOME/.kde4-amarok/"
Then run "systemsettings" and configure how you would like Amarok to appear ( colour scheme, etc. )
Finally, run "amarok" to start Amarok itself.
This will work for QT applications as well, but you can't set the style from within the application like you're trying (app.setStyle(QStyleFactory::create("oxygen");) You'll have to use a slightly messier method:
sys.argv.append("--style=Oxygen")
This will read the argument from the environment, and won't make a whole new Oxygen theme instance, (assuming you've set the KDEHOME environment to somewhere in your project, and you've already customized that) and will then use that KDEHOME to read the colors from and use the Oxygen theme.
Maybe they'll change this for QT5... (The ability to set a style programmatically)
How can I make my application always be on top meaning that the user couldn't access start menu or desktop in Qt or any other possible c++ way?
Also i need it to start right after the login progress , more like a new gui for windows , a simpler one
QWidget::setWindowFlags(Qt::WindowStaysOnTopHint) should do the trick. Note that on some window managers on X11 you also have to pass Qt::X11BypassWindowManagerHint for this flag to work correctly.
I have a simple interface (Can be touch-based or can be operated by mouse clicks). When I select a text box, a virtual keyboard should pop up. I have done a little digging, and xvkbd looks nice. X11 is the only dependency, which is fine! However, I do not want to install a keyboard in a system and call it issuing commands or set environment variables. I want the keyboard to be a part of the application I make, and it should pop up when I run the application and select a text box, and under no other circumstances. As I gather, coding a virtual keyboard from scratch is not the easiest of tasks. If there is something I could use in my C++ application, it would be really nice. Please advise.
Check matchbox-keyboard, it should do what you need with gtk.
Taken from its README
Embedding
You can embed matchbox-keyboard into other applications with toolkits that support the XEMBED protocol ( GTK2 for example ).
See examples/matchbox-keyboard-gtk-embed.c for how its done.
You could use QX11EmbedContainer, if you have access to Qt. If not, you can embed the xvkbd's window yourself (see here how).
Say I have a custom GTK+ widget obtained from a third party library. It has an accelerator, e.g it hides itself when I press 'h' or click it, and shows itself when I press 'h' again or double-click it. I want disable this particular functionality of the GTK+ widget. How can I do this without changing the source code of the Library and rebuilding it?
Note: You can also give your solution in c++ , in fact it would be better that way because I am using C++ for my project.
I'm guessing now, but how about gtk_widget_can_activate_accel () ?
http://developer.gnome.org/gtk/2.24/GtkWidget.html#gtk-widget-can-activate-accel