When I compile programs in qtcreator, the widgets use the GTK theme, despite my being in the KDE desktop environment. I've read online that this is due to the fact that KDE uses Qt4, so when I try to compile programs in qt5, it doesn't work. Is there any way around this? Also, I don't want to do any styling with QSS, I want my application to use the system's theme.
There is a workaround! You could install Project Neon KDE Frameworks 5. It's not necessary use it, you can continue using KDE4, but in installation directory, you can find a QT5 whit Oxygen and other themes compiled in. In QtCreator, from menu Tool/Options select "Build & Run", in "Qt Versions" Tab, you can add a new Qt Version, simply you can select qmake command installed from Project Neon. In my case I selected "/opt/project-neon5/bin/qmake". You had also to create a new Kit in Kits tab for new QT5 version. If you recompile QT5 applications whit this new kit, you produce an application whit Oxigen usable. You can run that applications in KDE4, but pay attention that ~/.config is not used whit this applications. In its place you should use ~/.project-neon5-kde/config.