Native Kde Look for Qt 5 App

Native KDE look for Qt 5 app

Oxygen is part of KDE, so that's where you find it. It's not a stand-alone theme. You cannot build KDE against Qt 5, it's not supported. The next major version of KDE (KDE 5) will be using Qt 5.

So right now, there's absolutely nothing you can do. If you want your application to look and behave nice in KDE 4, use Qt 4.

How to make use of KPixmapSequence on KDE Frameworks 5

It seems that one needs KIconLoader to make it work:

auto seq = new KPixmapSequence;
seq->setSequence(
KIconLoader::global()->loadPixmapSequence(
QLatin1String("process-working"), KIconLoader::SizeSmallMedium));

Using KDE System Theme in Pure Qt Application

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)

Why does my Qt app ignore the setting of applicationDisplayName?

The docs are a bit confusing on what the applicationName and displayApplicationName are actually used for, there has been some bug reports about it, and behavior has changed between versions if I remember correcly.

If you want a window-title, I think you can do.

window->setWindowTitle( QCoreApplication::applicationName() );

KDE themes used to style Qt4 application

If you're talking about Qt Styles(QStyle) that are used in traditional C++ KDE themes(non Plasma or ini themes) then yes you can do that to some extent, though you may have to adjust/fix some(or more) things since their mostly written with the KDE theme purpose in mind. One good example would be to fix or ensure the cross-platform compatibility(the theme might use additional platform specific libraries). Then there's also the licensing issue that you definitely have to take into consideration, since most of those themes are under GNU GPL.

If you're talking about Qt Stylesheets, you are out of luck, since currently KDE doesn't support any way of theming using Qt Stylesheets, thus you have no KDE Stylesheet themes to use.

Writing generic/native look GUI linux application

I don't think so, because I am not sure that any native look is well defined. However, toolkits like GTK (used by Gnome & XFCE) and Qt (used by KDE) are somehow standardizing some "common" (or at least usual) look... (and indeed, both Gnome and KDE define some visual and behavior guides, which are incompatible).

Did you consider making a web application -perhaps using FastCGI, or even some HTTP server library like libonion or Wt? It would use the usual browser "look and feel" ...

Notice that thanks to X11 and conventions like EWMH, applications written in GTK can inter-operate with applications written in Qt (and vice-versa), even if they are looking slightly different... And as commented by andlabs, you might make appropriate themes for them to make them look even more similar.

Also, several Unix and Linux applications (even recent ones like git) are mostly command line applications (which does the bulk of the work), with some smaller GUI wrappers, perhaps communicating with the CLI application (e.g. thru pipes). Perhaps you could organize your application likewise: have most of the work done by some command line executable and add some small
GUI wrappers above (you could then code one wrapper in GTK for Gnome and another wrapper in Qt for KDE). You could even go even further by designing and developing a free software library implementing your features, leaving the bulk of the GUI work to other developers (and accepting improvements to your free software library)?



Related Topics



Leave a reply



Submit