Which, if any, achieves Windows native look: GTK+, wxWidgets, Qt, FLTK?

前端 未结 4 2022
北恋
北恋 2021-01-31 03:21

I need to write an application that will be visually indistinguishable from something written natively for Windows XP/Vista/7 using whatever comes by default wi

相关标签:
4条回答
  • 2021-01-31 03:37

    Implementation details aside, wxWidgets philosophy is, and has always been, to look as natively as possible. We, wxWidgets developers, don't always achieve the goal of looking indistinguishably from the native applications but we always strive to do it and. AFAIK this is not such an important goal for Qt and definitely not for GTK+, so in my (obviously biased) opinion, wxWidgets is your best choice if you are serious about providing the best experience for your users, especially under OS X.

    To answer your question more precisely, everything you list above is implemented using native controls in wxWidgets for Windows (rich text control is not available natively under the other platforms though).

    0 讨论(0)
  • 2021-01-31 03:40

    I won't talk about FLTK as I don't know it.

    • wxWidgets uses the native toolkit of the platform, (GTK on Linux, Win32 GUI API on Windows, Cocoa on MacOS X).
    • GTK uses a theming API to fake the look and feel of the platform (custom theming engine on GTK2, CSS-based engine on GTK3).
    • Qt uses styles to fake the look and feel of the platform.

    wxWidgets API is quite ugly from my own experience, because it had too many method just available on one or the other platform making stuff non-portable unless you'd workaround it. Unlike GTK+ and Qt, it also adds its own layer of bugs above the toolkit it uses as a backend. However, it tries hard to have the platform's native look as it uses the native toolkit.

    GTK+ 3 still has some rough edges on Windows, which it officially supports since GTK+ 3.6. The GTK+ project delegates to the MSYS2 project the distribution of Windows binaries. As you're already using MinGW, that's pretty much the same kind of environment. They have good C++ bindings with GTKmm. However, you may have some work to get the theming right for your version of Windows.

    Qt is a good choice for cross-platform C++ development with the main target being Windows, tries to mimic the native look and feel of the platform but has its own theming limitations too.

    To sum up, there are only 2 approches:

    • toolkits that provide their own widgets and try to look like the native platform by providing theming (GTK+ and Qt)
    • toolkits that use the native widgets but hide their API behind a layer of abstraction (wxWidgets)

    Both have their pros and cons.

    0 讨论(0)
  • 2021-01-31 03:52

    IUP - Portable User Interface library uses native widgets, C API and Lua bindings.

    0 讨论(0)
  • 2021-01-31 03:53

    i used java for native cross-platform without changing the code, used c/c++ wxwidgets for exclusively cross-platform if you want go to little up performance and standalone executable, used c/c++ winapi for windows and x11 for gnu linux native platform and terminal console, used python for scripting console and platform if you want your software up to date fast, and used assembly for a little simple purely console. And sometimes i combined them all with shared library .dll on windows and .so on gnu linux. And i liked doing for do comparative performance on programming studies with small hardware requirements.

    0 讨论(0)
提交回复
热议问题