I was wondering, how an app which uses Qt for its GUI can be adapted to the Elementary Look & Feel. I know that elementary-specific apps are typically written in Vala, where, according to the docs, Gtk+ is used for user interfaces. So since Qt is able to delegate its renderings to Gtk+, at least as far as I know, is there any "best practice" on how to immitate the Elementry Look & Feel when one is bound to Qt and e.g. C++?

For example, elementary app windows lack classic title bars, whereas QMainWindow and QDialog all come along with such. We can get rid of them using Qt::FramelessWindowHint though, but how do keep the window borders? And is there any convenient approach to achieving these elementary-typical toolbars?

Or maybe, is the adaption of the elementary Look & Feel only possible when using Vala and Gtk+, but if so, then why?

1 Answer 1


AFAIK the L&F would probably be achieved delegating the rendering to GTK from the Qt app. The problem is that all of the eOS APIs, IIRC, are written in Vala therefore you won't be able to interact with them.

If you only care about the theming of the app to be the same as the OS make the Qt use the current gtk theme but if you care about the os APIs there isn't other way than writting Vala (and using GTK)

Note: with APIs I also mean the GTK widgets made by the eOS team specifically for the distro.

  • This is sad, as it drastically limits potential contributions to the "stockpile" of Elementary-specific apps.
    – kostrykin
    Commented Aug 2, 2016 at 20:51
  • I wouldn't think of it as a litimation but as an opportunity. People could start writing code to communicate and make both APIs work perfectly but this is a really small community. I think we'll be seeing this with the pass of time. Commented Aug 2, 2016 at 23:08
  • What I do not understand: Vala compiles to C, thus writing a C-interface to elementary's "Vala-only" APIs should be fairly straightforward. Having the Vala API available alongside of Qt in a C++ app would be at least a point to start. Am I missing something?
    – kostrykin
    Commented Aug 3, 2016 at 9:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.