TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Time to give up on Qt?

75 点作者 metaxyy将近 13 年前
I'm about to start on a cross-platform desktop app, and I'm trying to choose a GUI toolkit. I was originally planning to use Qt, because it looks great right out of the box, and the API is nice and simple.<p>With Nokia kicking Qt to the curb, should we all be moving to wxWidgets? Something else? GTK+ still doesn't look very native on Windows or OS X, so for many cross-platform apps it's not a viable option.

27 条评论

danieldk将近 13 年前
Qt is currently probably the best multiplatform native GUI (and non-GUI) toolkit. IMO it got into that position especially because it was always well-funded (via Troll Tech and later Nokia). If Nokia dropped Qt development completely and Digia wouldn't pick up the slack, the pace of development would probably at least be comparable to Gtk+ and wxWidgets, given that Qt is very widely used (from KDE to closed-source software).<p>tl;dr: Qt is very much ahead of Gtk+ and wxWidgets, progress will, at worst, be comparable to that of Gtk+ and wxWidgets.
pavlov将近 13 年前
Qt may not be a cornerstone of Nokia's mobile strategy anymore, but it's still being actively developed and has wide industry support. Major companies like Autodesk rely on Qt. They're not going to rewrite everything in GTK+ just because of Nokia...<p>Look for the GUI framework that best suits your purposes now, rather than the one you think is the best long-term strategic investment. If the toolkit sucks, your app is not going to be finished anyway and it won't matter what happens to the framework five years down the road.
tikhonj将近 13 年前
I don't think Qt is going anywhere. Of course, I'm biased--I use KDE, which is wonderful and uses Qt as the native toolkit. But that is an important point--Qt is used in a bunch of open source projects, and KDE itself is pretty big. I don't see Qt at much of a disadvantage to GTk even if it loses all corporate support.<p>Personally, I was not very impressed last time I tried to use wxWidgets. Unfortunately, this seems to be the best option for Haskell, and I really want to use an FRP style for my next project. Also, I suspect most of my problems were to do with my not knowing wxWidgets and using the Haskell bindings. (Particularly, I wanted a rich web view sort of widget, but that doesn't come in the standard distribution--the standard one just doesn't cut it.)<p>So: for most cases, I would advocate Qt over wxWidgets or GTk.
bitwize将近 13 年前
Qt -- particularly the desktop version -- is still being supported and maintained by Digia (and the Qt community).<p>Digia have been fairly aggressive in insisting that Qt isn't going anywhere and touting the features of upcoming Qt 5.<p>There really is no better cross-platform GUI library at this time. To jump ship from Qt now, I think, is a fool's move that will create hassle later on down the line.
评论 #4220261 未加载
mseepgood将近 13 年前
It's time to give up _cross-platform_. Doesn't work well with the increasingly different UX concepts of different platforms anyway. The only viable cross-platform is the web.
评论 #4217043 未加载
评论 #4217339 未加载
评论 #4217356 未加载
评论 #4217478 未加载
评论 #4217055 未加载
SoftwareMaven将近 13 年前
It a big bowl of "it depends", IMO. Qt is going to keep getting some level of support through companies like Digia[1] and KDE[2]. Especially because of KDE, an entirely open community might spring up around it.<p>However, I wouldn't bet my own company on it right now. In a year, we'll know where the chips are going to fall. The real problem, of course, is there isn't anything else quite up to Qt's standard.<p>If this is a for-fun project, patrickaljord's suggestion to use NaCl and html5 isn't a bad idea. I wouldn't do that right now if I wasn't doing it just for fun, though. You are going to get cut up by the bleeding edge there, which is fine if you are trying to push the edge, but sucks when you are just trying to get stuff done.<p>1. <a href="http://www.digia.com/en/Qt/" rel="nofollow">http://www.digia.com/en/Qt/</a> 2. <a href="http://www.kde.org/community/whatiskde/kdefreeqtfoundation.php" rel="nofollow">http://www.kde.org/community/whatiskde/kdefreeqtfoundation.p...</a>
bratsche将近 13 年前
I did a lot of work on the Win32 backend for GTK+ a few years ago, but then when I started at Canonical I stopped working on that. Nobody else really picked it up either. Tor Lillqvist was the original developer of this, and I think he's basically stopped working on it as well.<p>It's been awhile since I used wxWidgets, but I had an absolutely awful time with it. Honestly if Qt wasn't around, I would choose to contribute to GTK+ to get it back into shape rather than be forced to use fucking wxWidgets.<p>If I were in the situation of needing to work on a cross-platform GUI app again, having the experience I already have with GTK+ and its Win32 backend, I would choose to go back to contributing to the Win32 backend and write my app using GTK+ (or probably Gtk# with .NET and Mono). But if I were in your position and did not already have both the experience with the Gdk backend and the predisposition to use GTK+, I would absolutely use Qt.
eliben将近 13 年前
No way. Qt has a huge following of users and community around it, and it also happens to be an open-source project.<p>If you're worried about commercial support, that's provided by Digia now, and anyhow Qt is used by so many paying customers that other shops will spring up providing commercial support, if the market demands it.
Jarred将近 13 年前
This is something between desktop and web, but you could use Chromium Embedded (<a href="http://code.google.com/p/chromiumembedded/" rel="nofollow">http://code.google.com/p/chromiumembedded/</a>). It uses GTK+ on Linux, Cocoa on Mac OS X, and it's own library on Windows (but it looks identical to Windows' UI elements).
评论 #4217199 未加载
saghul将近 13 年前
Qt is not going anywhere. I recently attended Akademy and the current QtCore maintainer, Thiago Macieira, showed some interesting stats: over 40% of the commits in the past few months (IIRC) came from non Nokia people.
评论 #4218173 未加载
pjmlp将近 13 年前
I would keep using Qt.<p>Currently it is the best C++ toolkit for cross platform applications.<p>Last week I also started a new project using Qt.
readme将近 13 年前
Qt is without a doubt the best cross platform desktop API.
jalcine将近 13 年前
Your best bet, as many have prescribed here, will be Qt. It works DECENTLY well under GNOME and fantastically under KDE (ofc) if you're concerned about the Linux market, and works pretty well on Windows, too. Personally, with QML and the ability to style applications using stylesheets (not full CSS) and adding scripting support with QtScript is a win-win for me.<p>However, it really depends probably on the <i>kind</i> of application you're looking to build. If anything (probably silly too), you could build a HTML5 container using Qt, build a API that communicates for native actions and render the rest of the application in HTML5. Better off just making a SaaS, however.<p>Disclaimer: Hard-core KDE user and FOSS advocate (read: not a freetard)
haakon将近 13 年前
For some perspective, the KDE project posted this today: <a href="http://dot.kde.org/2012/07/09/kde-rely-qt-protect-qts-freedom-contribute-it" rel="nofollow">http://dot.kde.org/2012/07/09/kde-rely-qt-protect-qts-freedo...</a>
dman将近 13 年前
You could have both wx and qt - check out <a href="https://github.com/enthought/enaml" rel="nofollow">https://github.com/enthought/enaml</a> . Enaml is a python based UI toolkit which makes writing cross platform UI's ridiculously easy.<p>Heres a clone of osx preview written in about 250 lines of code -<a href="https://github.com/enthought/enaml/tree/master/examples/preview_app" rel="nofollow">https://github.com/enthought/enaml/tree/master/examples/prev...</a>.<p>Enaml has qt and wx backends. Layout is constraint based and uses the same Cassowary algorithm used by iOS. As a result ive had the incredible experience of writing UI's and have them perform identically on windows, mac, linux and freebsd. Also since the sizing is handled by Enaml itself, the same ui can be run on both wx and qt and will appear identically sized.<p>Disclaimer: I work at Enthought and am friends with Chris Colbert who is the primary author of enaml.
评论 #4218111 未加载
randomdata将近 13 年前
Qt is probably pretty hard to beat in maturity, but <a href="http://www.cocotron.org/" rel="nofollow">http://www.cocotron.org/</a> looks like an interesting project, allowing you to build your OS X applications for other platforms (Windows, Linux).
评论 #4216973 未加载
评论 #4216974 未加载
patrickaljord将近 13 年前
Go nativeclient+html5. Best of both worlds. You could still distribute it as a standalone app like <a href="https://github.com/adobe/brackets/" rel="nofollow">https://github.com/adobe/brackets/</a>
评论 #4217167 未加载
评论 #4216918 未加载
kristianp将近 13 年前
I was interested to see the claim that the dropbox client uses wxWidgets (actually wxPython) on this page: <a href="http://www.wxwidgets.org/" rel="nofollow">http://www.wxwidgets.org/</a>
评论 #4217457 未加载
dudus将近 13 年前
Qt is the best cross-plataform GUI Toolkit.<p>But it still feels odd on Windows, and OSX, and Linux (provided that most Linux users are on Gnome these days).<p>I would rather spend twice the time coding it for native Windows forms and OSX Cocoa.
评论 #4217136 未加载
kimmel将近 13 年前
&#62; Something else? GTK+ still doesn't look very native on Windows or OS X, so for many cross-platform apps it's not a viable option.<p>GTK+ can look just like Windows XP, Windows 7, Mac OS X. It has themeing capability.
评论 #4218667 未加载
评论 #4218777 未加载
silon3将近 13 年前
I wonder of Qt will lose popularity elsewhere just as many people migrate from Gnome to KDE (I did, at least for the default installation desktop where I don't run alternative WMs).
mattlaver将近 13 年前
The XWT framework is worth keeping an eye on:<p><a href="https://github.com/mono/xwt" rel="nofollow">https://github.com/mono/xwt</a><p>It may not be mature enough for the application you want to start now though.
stewie2将近 13 年前
Never! wxWidgets is too ugly. And it's similar to MFC. GTK+? I never got GTK+ compiled, there were so many dependencies, so many linking errors.
blub将近 13 年前
wxWidgets is not as well supported as Qt, nor is it as mature. I heard that GTK got some updates on Mac because the MonoTouch guys needed them, but the UI is the same as far as I know.<p>I think you can pick something else if you want to, but the two mentioned alternatives are probably not it.
mahmud将近 13 年前
I'm seriously considering XULRunner for a cross-platform desktop, "enterprise" app.
thdn将近 13 年前
Take a look at ultimate++
smeg将近 13 年前
If your looking for a powerful canvas feature, qt is really your only choice. That's what swung me away from gtk and wx.