0

Possible Duplicate:
What cross platform GUI library has the most native feel for each platform?

I know there are many cross-platform GUI library like

GTK

wxWidgets

But I am looking for a GUI library that use the host operating system gui style not its own.I mean I want that my cross-platform application in each os must belike other applications that has been write directly for that os.

Well , is it clear?

The problem is that I can't accept gui libraries styles because they are not beautiful (however they are not ugly :) ).

Community
  • 1
  • 1
Saleh
  • 2,982
  • 5
  • 34
  • 59
  • 4
    I think wxWidgets might be your safest bet. It tries to use native widgets for the most part. – Vlad Jan 13 '12 at 09:47
  • Are you sure? I did'n't see anything like that in its website.can you link me a webpage that this feature has been writen there? – Saleh Jan 13 '12 at 09:52
  • I couldn't get wxWidgets to compile on Lion the last two times I tried. +1 to the Qt answer, its got much better support and an LGPL license these days. Qt has much better chance of being 'beautiful' in that it's style able via QSS (A rough approximation of CSS) – synthesizerpatel Jan 13 '12 at 09:54
  • <> thanks for possible duplicate and sorry guyz that's it!! I got the answer. – Saleh Jan 13 '12 at 09:55
  • Qt might be "beautiful", but it doesn't use native widgets. It's really an epic fail for programmers who wish to give their users the standard platform experience (which should be all of us). Not sure what they were thinking. The project seems like a giant waste of time. [I've ranted about this before, while also including some helpful tips on cross-platform development](http://stackoverflow.com/questions/5061877/what-is-the-best-library-to-use-when-writing-gui-applications-in-c). – Cody Gray - on strike Jan 13 '12 at 10:10
  • @Cody Gray, yes Qt uses alien widgets by default to improve rendering speed, but you can force it use native widgets. Anyway, how it can be connected with user experience? It just all under the hood. – Lol4t0 Jan 13 '12 at 10:18
  • Spoken like a truly ignorant programmer. Native widgets have a lot of built-in behaviors that users come to expect and rely upon. They're missing when you try and reinvent the wheel. Comments like that are why we're stuck with so many broken and half-assed apps. But you're not alone, Microsoft recently got the same disease. It's good to know you can flip a switch to make Qt semi-compliant. I suppose I didn't spend enough time hunting for it. The other drawbacks of the library made it not-so-appealing as well. Like its giant size. Or the fact that it requires multiple compilation steps. Etc. – Cody Gray - on strike Jan 13 '12 at 10:21

2 Answers2

4

Try Qt, but it only provides only subset of widgets, that are common for every OS (windows, linux, Osx supported), so no ribbon on windows or special kind of buttons on Osx

Lol4t0
  • 12,444
  • 4
  • 29
  • 65
  • 2
    @pst, Qt have an option to use native look. It can even do the "OK key on the left/right" kind of things. – J-16 SDiZ Jan 13 '12 at 09:55
  • That hasn't been true for a long time now, yet lots of people spread it. Do you use VLC or Clementine? Both are Qt apps and they look and behave very natively on all their supported platforms. – Tamás Szelei Jan 13 '12 at 09:56
  • 1
    @pst: In my experience, Qt usually looks native, or unique-per-application thanks to Qml or Stylesheets. – Sebastian Mach Jan 13 '12 at 09:57
0

As it mentioned above, wxWidgets lib uses native GUI rendering. But there is also another approach, that is used in Abiword word processor. You can separate UI and application logic by creating abstractions - some kind of your own framework. So there will be common part for all platforms - application logic and event handlers for the controls, while UI code for creating controls is platform dependent.

I understand it's rather hard work to implement you GUI in such way, but in this case you are getting something, that cross-platform libraries will never provide for you due difference in OS GUI standards - completely native-looking application.

Btw, you can look at Abiword sources(http://abisource.com/developers/) to understand how it implemented there (cross-platform part is at http://www.abisource.com/viewvc/abiword/trunk/src/af/). Maybe it's overkill, but it's good place to start from.

Volodymyr Rudyi
  • 638
  • 11
  • 25