277 points · by Tsiolkovsky · 13y ago · 135 comments
I've always found it annoying to have to work with frameworks that invade your project with their own type defines, particularly when they are just parallel versions of types already in the language's standard library.
And there's of course also a lot of historical reasons for the overall approach - when Qt started out, standard C++ was significantly weaker both in what the standard contained and how the standard was available. That's not to say I think Qt's mode of operating is obsolete, though; a lot of the value of Qt comes from good API hygiene (pleasant API design, consistent API pattern reuse), and I find that having my $usecase be met by a nice Qt-style API is generally a pleasant discovery.
Mind you, I -only- used Qt standard libraries (except QExtSerialPort which was the best option for serial access at the time I started the project).
I definitely agree with preferring Q-types to STL. Combined with Creator as an IDE, it's brain-dead simple and I spend my time on higher-level concerns. (FWIW, I wish Creator had more languages supported, I've never had such a wonderful experience in any other IDE. I want to shoot XCode every time I open it, mostly because Creator has spoiled me on how good auto-complete can be.)
Today I was astounded when I found out that passing NULL to std::string::operator=() results in a crash.
Qt's QString and QByteArray classes run null checks on practically everything.
It's not bad but it shows it's age. A lot of it could be updated to use standard strings/collections/shared_ptr etc.
Qt needed to be portable across several compilers and OSs, even before the ANSI C++ standard existed.
Contrary to what many HN folks think, there are more compilers out there than just gcc, clang and visual c++.
same think can happen with gtk or any framework (toolkit, actually, to be pedantic about it), and anyway, in an oo language especially, there are design patterns to cope with this.
Go look at GLib (which underpins GTK+), it has its own string type, its own boolean type, even its own object-oriented programming scheme emulating Java-style OOP.
Of course they have more of an excuse given that they wanted to stick with C instead of using C++ due to (at the time) poor language design and compiler support. But then again, that was Qt's excuse too! ;)
Edit: grammar and some bloopers :)
(1) During the 4.x cycle, Qt integrated a new declarative markup language called QML, as part of a new language + batteries module called Qt Quick. In Qt 5, Qt Quick has improved significantly and become a very viable choice for many interesting and useful applications.
(2) Desktop-type applications are not yet among those. While Qt 5.2, to be released toward the end of this year (currently it's in alpha) contains some new Qt Quick batteries to implement desktop-type interfaces that are quite promising, they're also still fairly young and rough, and not suitable for demanding applications.
(3) QWidget continues to be maintained and fully supported. It's mature technology that hasn't seen massive changes in the initial leap to Qt 5, but has nonetheless benefitted from many improvements in the core of Qt.
(4) Further, in Qt 5.2, the KDE community in particular (which is in the process of transitioning to Qt 5 and is a major stakeholder of QWidget, while also making strong and increasing use of Qt Quick) has upstreamed tons and tons of features and code that make QWidget and related APIs even stronger than it already was. Qt 5.2 is an exciting release for users of QWidget and QML alike.
(5) Qt is a proper open source project with well-working governance today. It's also a well-modularized, well-layered codebase. There are no significant roadblocks to caring for and maintaining QWidget for as long as the Qt community sees fit. At the same time, Qt Quick offers some compelling advantages and is likely to evolve as well.
Having used those a bit, I have to conclude that they are FREAKING AWESOME. Sorry for yelling. If you are used to developing Qt applications using C++ and the Widgets only, please do check that out. It is amazing!
Qt widgets will not see any improvements. They haven't see any improvement for the last 2 years. Here, answer these questions for me and decide for yourself: 1. What new APIs were added in Qt widgets in last 2 years? 2. What new widgets were added in the last 2 years? 3. Is the Qt team working on improving various look and feel aspects of widgets on the Mac and Windows 8?
Just do a git log and see for yourself - https://qt.gitorious.org/qt/qtbase/source/HEAD:src/widgets.
Do you recommend a different way to go about it with sufficient productivity as Python ?
However, since this module has been under heavy use in the past, its feature complete and needs no new features.
Its still used by hundreds of legacy applications and is in no way 'obsolete'.
For me, it's all but obsolete. If you want to argue about English usage, then that's fine.
[1] http://blog.qt.digia.com/blog/2013/09/30/qt-5-2-alpha-availa... [2] https://github.com/qtproject/qtmacextras
http://blog.backblaze.com/2008/12/15/10-rules-for-how-to-wri...
Rule #2: Factor out the GUI into non-reusable code – then develop a cross-platform library for the underlying logic
I'd like to hear others experiences and views with doing that as opposed to using something like QT or GTK.
Using MVC, it's more straightforward what components are specialized per OS and which ones are common.
Not only that, having native apps would make the app UX "feel" better too.
I'm using libuv, SQLite, CurveCP/NaCl and MessagePack for the cross-platform stuff, and the rest of the code is straight C (which I prefer to C++). So far, it's working well, although it did require more effort to set up initially, primarily due to multi-threading.
Assuming that you solve the CLI bits, using Qt is probably reasonable enough for all your GUI users that aren't running pure GNOME/GTK systems -- at one point in the past, Qt could even make itself look like the current GTK theme (although I'm not sure if that's still true now).
http://www.wireshark.org/docs/man-pages/tshark.html http://www.youtube.com/watch?v=JZDiQ6f_TRs
What I'm trying to get at is: as the maintainer of a Wireshark plugin, what should I be doing to prepare myself for the switch? Will I need to start maintaining to versions of the plugin, one for Glib and one for Qt?
Comedy gold!
However, having only casually looked at both Qt and wxWidgets, how do MODERN versions of both compare?
Doing something with a GUI toolkit is something I'd like to visit at some point in the future, and Qt seems to have more mindshare, but from what I understand Qt doesn't actually draw native widgets, merely emulated ones. Reading about MOC and seeing the number of .dll's included with the average Qt project also put me off a bit.
To give you an example - getting the current line or number of lines from wxTextBox control on Windows might in fact do way more than what you expect (the leaky abstraction) - it sends a message to the control to get size/current line - but what that does internally could be something which scans the buffer over and over - so if you have a hundreth of megabyte window with text (log screen) - you might have severe slowdowns.
Also I've found it very hard to extend with custom widget and make it right. Qt is much easier, while MFC has been the hardest for me. Juce is also easy, and I guess gtk would be too.
But it does rather limit you to either qmake or cmake, afaik.
I personally do not give a flying fart what the "visual experience" is as long as it works and the interface is very usable.
You know who said something similar in the last few years? Jony Ive at Apple. Even though I like the concept of flat design and really wanted to like iOS 7 at first, it is the first time since Jobs left the world that they royally fucked over the UI. And it was in the name of "visual experience". It's hard to believe they even tested it on humans. To tell you how bad I think it is: I used it for days in inverse color mode, because that was better. If you've used that for a while, you know what that means.
I know they tried and they got some things right, but that is the reason you give interface to UE people, NOT designers. Great designers don't make great interfaces. They make great designs.
So, screw the visual bells and whistles. Give me emacs and midnight commander.
I'm considering using Qt for an OS X project and would love to see what it can do when used well.
It does require some work and familiarity with OSX UI idioms.
Have there been any performance improvements to command line tshark recently?
Also, +1 for the resurgence[1] of tk for lightweight GUI apps : -) Who needs native anything, when THE tool kit is installed everywhere python is (which is also everywhere).
1: http://www.rstudio.com/ide/ 2: http://www.brackets.io/ 3: http://www.lighttable.com/
Although we mostly get away with it in today's strange world of reinventing the wheel inside a browser, it's still a hack.
(I'm not sure at all)
Even though it's minimal on the desktop, the styling of the UI is still affected primarily by the GTK theme. On KDE I'm using oxygen-gtk to make Firefox look native.
This is because the startup times with XUL were simply too slow. The first version of Firefox for Android did, in fact, use XUL just like desktop Firefox. The app startup times were atrocious. The decision to use a native Android UI made the app usable while Gecko was starting in the background.
There are still a few issues in gimp OSX... like some dialogs needing ctrl+c ctrl+v instead of cmd+c cmd+v for copy paste. However, it is a very nice app on OSX now.
Do you mean extra resources required by the GUI while capturing data? I've never captured traffic on a server using Ethereal/Wireshark. It's easier to use tcpdump to do that, save the captured data to a file, and then view that in Wireshark.
http://www.wireshark.org/docs/wsug_html_chunked/AppToolstcpd...
In some cases text/keyboard interfaces are better. Like for instance when editing case. In some other cases, graphical/mouse interface is better. Like for instance web browsing.
Command-line tools generally offer a larger language than GUI applications. And if that language is not enough, you can still combine them; something that is impossible with a GUI app.
(I know you can do modal dialogs, comboboxes, even graphics in a console, but most people seem to agree GUI is better for that)
It also used to be very Linux/Gtk-centric too, and part of me is sad that the focus is now on enabling proprietary platforms at the same level of robustness. But that's obviously a philosophy thing and I'm not the developer.
And to get to the point of the blog post: it's absolutely true that cross-platform sanity has never been part of Gtk+'s design goals. It's always (well, since Gnome 1.0) been a playground for stuff in Gnome, and work on other environments a secondary thing done mostly by volunteers.
From the perspective of an app developer, Qt is much (much!) cleaner in this regard. Though it gets that at the cost of staggering code size and build complexity. Really Qt has to duplicate the superset of features provided by all the supported environments. It does it, but I can't say it's pretty.
QT4+ is faster than GTK3, the API is superior in almost every respect, has better cross-platform OS support. It should be telling to every user how some basic widgets like the file-open dialog in GTK3 has actually regressed in every respect compared to GTK2, and many others actually behave worse from the user's point of view (which should be the #1 priority of any widget system, even before the API).
I used to prefer GTK for the footprint (and mind you, I was always aiming at pure X11 development), but not anymore.
I would say it is was a fairly interesting interview that covered the future developments for Wireshark.
Qt has been a pain in my ass in OS X. You get the wrong version installed in the wrong place and you're fucked. I think it is something that is kind to developers and a headache to users.
Personally I give a big thumbs down on this decision. It's one thing for some random program or library to use Qt that I don't care about, but I've been using Wireshark since it was Ethereal. It should not be Qt. That's lame.
We wanted to please the trendy Mac users, hence switched to Qt, which providers a more authentic interface on Mac OS X.
While I love gtk for the fact that it's C, it's not that easy to use from ffi-exposed systems like luajit, since it relies too much on preprocessor macro magic that has to be replicated there...
Dear lord.
No, really swing is aweful. I had to use many years ago, and it was very slow then. I've liked SWT (native+java) from eclipse for a while, but wanted to use more on the native c/c++ but wasn't that straightforward...
This really isn't up to some subjective opinion either. Swing doesn't have a native look & feel on any platform: it's awful no matter what OS you're using.
GTK3 is good enough and QT seems more bloated and has more dependencies.
Anyway, I will use tcpdump.
Byebye, wireshark.
There is a reason why upvote exists. It pushes good discussion top. If you are worrying about space complexity: good news! HN is using a modern database, not flat file. You can store 10k comments.