Desktop UI Toolkits/Frameworks


  • area_can

    I wanna throw together a desktop app for a side project, but I'm not quite sure what to make it with. I want it to be cross-platform (I know that using a cross platform toolkit doesn't make your UI really feel at home or native because it needs to be designed correctly for each platform, but I'm a programmer so the UI is going to be shit anyways). From searching I've done, I've got these options (feel free to add your own):

    • JavaFX: supposed to be nicer to work with than swing?
    • Qt: it's Qt. I'll have to write my app in their pseudo-C++, though. Or use python bindings, but I don't want to write Python.
    • Wxwidgets: uses native ui elements under the hood, hella mature

    Does anyone have experience with any of these or have any tools that they'd recommend?


  • area_can

    Also, I'm not really feeling up for working with a web UI because that'll exponentially increase the number of options for me


  • Impossible Mission Players - A

    Ncurses perhaps?


  • area_can

    @Tsaukpaetra I should've mentioned, it'd be a graphics program so terminal stuff is out



  • @bb36e said in Desktop UI Toolkits/Frameworks:

    • JavaFX: supposed to be nicer to work with than swing?

    The only thing cross-platform about Java UIs is that they feel non-native on every platform. For real, though: No experience with it.

    • Qt: it's Qt. I'll have to write my app in their pseudo-C++, though. Or use python bindings, but I don't want to write Python.

    It's C++, what's pseudo about it?1
    I've used Qt and I like it. Feels mostly native on Windows, not quite as much on Mac, and on Linux I despise everything that's written in GTK2 instead of Qt.

    1 I guess you're talking about the MOC. But it's really only a single C Macro and a code generator. There's nothing in it your standard conforming C++ compiler doesn't understand. You could even write the generated code (which basically adds some RTTI/introspection information) yourself to be "pure", although that would be insane.
    2 Supposedly cross-platform too? Doesn't matter, it's terrible.


  • area_pol

    @bb36e said in Desktop UI Toolkits/Frameworks:

    Qt: it's Qt. I'll have to write my app in their pseudo-C++, though. Or use python bindings, but I don't want to write Python.

    I have used Qt as was satisfied with it.
    I like the event binding (there is a lot of events in UI), and also the ability to use a stylesheet for your UI.

    Now you have a third option as they have QtQuick, which is programmed with JS.

    The custom C++ is mostly binding signals/slots, but now you can put lambda functions in signals, so no need to create your own slots though.
    Anyway it builds with CMake and works on every OS.


  • Discourse touched me in a no-no place

    @topspin said in Desktop UI Toolkits/Frameworks:

    Doesn't matter, [GTK is] terrible.

    QFT. I've worked with it in the past because someone paid me to do it, and it was just a miserable API.



  • @SpectateSwamp Desktop Interface Framework?

    Filed Under: Kill it with fire!


  • Winner of the 2016 Presidential Election

    @bb36e said in Desktop UI Toolkits/Frameworks:

    @Tsaukpaetra I should've mentioned, it'd be a graphics program so terminal stuff is out

    Ncurses: foiled again!



  • HTML

    Search your feelings, you know it to be true.


  • area_can

    @anonymous234 said in Desktop UI Toolkits/Frameworks:

    Search your feelings, you know it to be true.

    😭



  • @bb36e - go back to the roots 80x24 character mode. If you are careful, you might even be able to use ANSI sequences :) :) :)



  • @dkf said in Desktop UI Toolkits/Frameworks:

    QFT. I've worked with it in the past because someone paid me to do it, and it was just a miserable API.

    The end-result of GTK is fucking terrible, too.



  • @scholrlea said in Desktop UI Toolkits/Frameworks:

    @SpectateSwamp Desktop Interface Framework?

    A.k.a. the Visual Basic 6 version of WinForms.

    You could do worse. Honestly.


  • area_can

    After playing around with Qt, QML seems really nifty for prototyping and quick simple programs. Neat! Maybe I'll try and write a custom component in c++ and try and tie it in with the QtQuick components via QML.

    The data binding is a nice feature.



  • @tsaukpaetra said in Desktop UI Toolkits/Frameworks:

    Ncurses perhaps?

    For the record: ncurses doesn't work on Windows.



  • @blakeyrat Yes, that's mostly what I meant. I don't actually know anything about programming GTK except that is apparently object oriented C, or something painful like that.
    But the fact that nobody managed to write a GTK program which doesn't suck makes me assume it's even more terrible to program than to use.

    Ok, I was lying, I kind of like Inkscape. But surely that too would be better if it used a different toolkit.


  • Discourse touched me in a no-no place

    @blakeyrat said in Desktop UI Toolkits/Frameworks:

    The end-result of GTK is fucking terrible, too.

    I suspect it is possible to do stuff with it that isn't terrible. That's true with every single toolkit I've ever seen provided you take enough care. But there's a lot of things to take care of even with the good toolkits, and I don't think I could stand to keep my wrists uncut for long enough to do a good job with GTK.

    More generally, most toolkits let you put up menus and buttons and things easily, but complex behaviours are much more awkward at best (widgets are hard to do well; custom ones even more so). But then you get into the horrid mess of making everything work nicely when the user changes their font sizes, or resizes the window, or drags it onto a machine with different resolution, or … Then there's getting all the damn keyboard shortcuts right, making everything portable to lots of platforms, handling accessibility right (toolkits provide support but don't completely solve it). And then you have to deal with the fact that non-trivial applications are thoroughly asynchronous (or even highly multi-threaded). Ugh. I hate dealing with GUIs to high quality because there's just so many annoying things that have to be done right.

    These days, I prefer to write servers and back-end libraries of various kinds. Much simpler and empowers others so they don't go round asking me to make GUIs. :p


  • Discourse touched me in a no-no place

    @topspin said in Desktop UI Toolkits/Frameworks:

    But the fact that nobody managed to write a GTK program which doesn't suck makes me assume it's even more terrible to program than to use.

    The defaults are miserably stupid and the API for setting things to sanity is horrid and very very verbose. You can use their GUI design program but, at least when I tried it, it only produced non-resizable GUIs, and those are about as useful as a chocolate coal scuttle on modern systems. (I really hope it is better now, but the fundamental problem when I was dealing with GTK many years ago was that getting resizing behaviour right needed extensive extra code that no GUI designer system would actually understand, so negating the benefit of using such a program.)

    And the documentation was shit too. (I can't remember if the “fun” of generic configuration object systems had quite hit Enlightened levels of annoying APIs.)


  • Impossible Mission Players - A

    @gąska said in Desktop UI Toolkits/Frameworks:

    @tsaukpaetra said in Desktop UI Toolkits/Frameworks:

    Ncurses perhaps?

    For the record: ncurses doesn't work on Windows.

    Not even on cygwin?

    I suppose you could use PDCurses instead...


  • area_can

    @bb36e after playing around with c++ integration, I'm still not a huge fan of the runtime breaking dynamism of signals/slots.

    Also, I forgot to include Q_OBJECT in one of my classes and apparently you have to manually run qmake to fix vtable/class issues that pop up during compilation. I would have thought that the official IDE would automatically run it as a build step or something, but nope.

    eat your heart out, photoshop:

    0_1504661758638_69f7fcd6-db60-450d-8e89-f6db1440431a-image.png


  • Winner of the 2016 Presidential Election

    @bb36e said in Desktop UI Toolkits/Frameworks:

    I would have thought that the official IDE would automatically run it as a build step or something, but nope.

    I think it's supposed to. Wrong project type maybe?

    :fa_cut: :disco: :horse: :speaker:

    Hi, Note that, Build or ReBuild will run qmake only when xxx.pro is newer than Makefile. In other cases, if your makefile need update, qmake must be called manually.

    qmake is used to generate the platform dependent makefiles.

    @
    xxx.pro ==> Makefile
    @

    When xxx.pro is changed, qmake will be called automaticly to re-generate the makefiles.

    However,in some cases, such as when Q_OBJECT is added to an exist xxx.h or xxx.cpp file which doesn't contain a Q_OBJECT before. Though .pro file doesn't changed, makefile must be updated to include the moc rules, so qmake must be called manually.

    That's from 2013, but I imagine it's pretty much the same reason today.



  • @thecpuwizard said in Desktop UI Toolkits/Frameworks:

    @bb36e - go back to the roots 80x24 character mode. If you are careful, you might even be able to use ANSI sequences :) :) :)

    Did somebody say


  • SockDev



  • @dreikin said in Desktop UI Toolkits/Frameworks:

    when Q_OBJECT is added to an exist xxx.h or xxx.cpp file which doesn't contain a Q_OBJECT before [...] qmake must be called manually.

    That's from 2013, but I imagine it's pretty much the same reason today.

    Yeah, it still works this way, and that is annoying. But re-running qmake is trivial so it's not a huge issue (and there is a shortcut for it in the IDE, I think? not sure because we've now switched to cmake instead -- and I don't know if it picks up correctly that case btw, I haven't tested that recently...).

    I am actually more annoyed by the errors you get when you forget the Q_OBJECT. In some cases, you only get very unhelpful link errors about vtable stuff, to the point where the doc has to mention that, essentially, "weird vtable errors are usually missing Q_OBJECT"... not cool.



  • @dkf said in Desktop UI Toolkits/Frameworks:

    I suspect it is possible to do stuff with it that isn't terrible.

    From what I've seen GTK apps can't even show an "Open File..." dialog in a non-terrible manner.

    Is it possible to make a non-terrible app using it? Yeah, maybe, if you ignore all its default behaviors and completely rewrite it from scratch. But that's hardly the point; you could just use a framework that knows what an "Open File..." dialog is supposed to look like in the first place, instead of one written by retards.



  • @blakeyrat said in Desktop UI Toolkits/Frameworks:

    From what I've seen GTK apps can't even show an "Open File..." dialog in a non-terrible manner.

    I realize I'm pretty late, but thank you! So much this, exactly.
    What the fuck did they smoke when they made that dialog?

    Although, and I guess here you can disagree again, OS X's native dialog sucks, too. Where can I paste a file name into that? Windows-style Open File is so much better. Actually, I have this little piece somewhere in my code:

        QFileDialog::Options options;
    #if __APPLE__
        // Finder-esque file dialog sucks
        options = QFileDialog::DontUseNativeDialog;
    #endif
    

  • area_can

    @topspin said in Desktop UI Toolkits/Frameworks:

    OS X's native dialog sucks

    Agreed. I was supposed to save a file to a directory in ~/Library and I couldn't find the folder. Apparently the only way to get the directory visible is through some secret key combination (or manually typing the path).

    Also, grouping/sorting by date is absolutely broken. It seems like finder sometimes fails to sort by time but is able to group by day, for some bizarre reason. Usually if I disable and re-enable sorting it sorts (ha) itself out.



  • @topspin said in Desktop UI Toolkits/Frameworks:

    Windows-style Open File is so much better.

    QFT. Being able to bring up the context menus of folders on the directory tree can be quite useful.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.