Slashdot Mirror


What 2D GUI Foundation Do You Use?

Zmee writes "I am looking to build a 2D application for personal use and I will need to use a canvas to paint custom objects. I am trying to determine what foundation to use and have not located a good side-by-side comparison of the various flavors. For reference, I need the final application to work in Windows; Linux is preferred, but not required. I have looked at WPF, Qt, OpenGL, Tcl/Tk, Java's AWT, and others. I have little preference as to the language itself, but each of the tutorials appear to require significant time investment. As such, I am looking to see what the community uses and what seems to work for people prior to making that investment."

74 of 331 comments (clear)

  1. HTML and Javascript? by Anonymous Coward · · Score: 4, Informative

    HTML and Javascript?

    1. Re:HTML and Javascript? by ZeroNullVoid · · Score: 2, Interesting

      QT and PySide for doing GUI with Python.

      QT for C++

    2. Re:HTML and Javascript? by arivanov · · Score: 5, Interesting

      I would agree.

      Investing your time into Qt is the best investment. Stick to C++ and Python. Both work.

      Avoid Perl-QT though. Not that it does not work, but it makes your brain go numb because you end up writing in pidgin-C++ intersperced with Perl. It overrides perl default OO conventions and uses C++ ones. There are parts where you have to outright put C++ snippets into the Perl code to get it work.

      Tk is also good, but obsolete by today's standards. Its one and only remaining use is writing UIs for Perl where you cannot use web ones.

      Avoid GTK: Grave danger you are in. Impatient you are. Once you start down the dark path, forever will it dominate your destiny, consume you it will. Always write Yoda code you will...

      --
      Baker's Law: Misery no longer loves company. Nowadays it insists on it
      http://www.sigsegv.cx/
    3. Re:HTML and Javascript? by g4b · · Score: 3, Informative

      You could use Googles GWT to write your GUI, and simply display a webkit window in the application, making it server-client friendly and usable via browser if needed.

      GWT is fairly cool and very advanced. You write stuff in Java, and it is translated to browser specific javascripts.

      However, I would still use Qt. For smaller projects I used wx already. PITA.

    4. Re:HTML and Javascript? by imcdowall · · Score: 2, Interesting

      Agree with this. I have built a web site that allows drawing using the HTML5 canvas and it works fine. You would need to store persistent data somewhere but the
      drawing is very easy and you can generate a PNG file from the canvas trivially.

      This works with Firefox, Chrome and Opera on Windows and Linux. It won't work with IE7 and earlier (I haven't tried IE8 but I doubt it). It should work with Safari but I haven't tried it.

      If interested, I can post links to good tutorials (but any reputable search engine should find them).

      --
      Ian McDowall
    5. Re:HTML and Javascript? by caseih · · Score: 5, Informative

      GTK+ is certainly weaker on the Windows and Mac side than Qt. But as far as speed and ease of coding, GTK+ is right up there. GTK++ is a great binding for C++, and PyGTK is quite good too. Writing Qt GUIs in PyQT is okay, but it's essentially the same as writing C++ code. In fact, it is the bindings where Qt is the weakest and where GTK+ is a bit better. Qt is written in C++ using the C++ object model and all it's features and warts. This does not always translate very well to other languages. A few years ago all Qt bindings for other languages were based on the QtC bindings because of this. Now Qt bindings are better. But GTK+, being based on a much simpler object model (the GOject) is very easy to wrap in C++, Perl, Python, Ruby, etc. PyGTK is one of the more comfortable toolkits to develop in and feels more at home in Python than Qt (PyQT; never have used pyside).

      GTK+ is hardly the "grave danger" the parent claims. For a lot of things it is a very nice toolkit to develop in. And the parent's statements on Tk are are not quite accurate. Tk is still alive and well, and looks reasonable in the modern incarnations on the big 3 platforms. It seems a bit daft to me to embed another entire language in my program (tcl) but sometimes that just might be the easiest. Many little utilities written in Python still use Tk. It's fast, easy, and always there if Python is there.

    6. Re:HTML and Javascript? by arivanov · · Score: 2

      But as far as speed and ease of coding, GTK+ is right up there.

      As I said:

      Avoid GTK: Grave danger you are in. Impatient you are. Once you start down the dark path, forever will it dominate your destiny, consume you it will. Always write Yoda code you will...

      The general problem with GTK is that if you follow the "easy" way you end up with an app whose UI is embedded into its state diagram. You cannot after that (at least without considerable effort) disentangle this UI from the backend and isolate portions of the backend to run headless. As a result making your app make use of a modern multicore machine is outright painful. It is not impossible, but hurts none the less. You are also much more likely to end up sitting on locks in many places which negates the advantages of multithread on multiprocessor machine. Just take your run-off the mill GTK app, load on a SMP machine and run it along with a CPU monitor.

      Qt gives you much more pain at first, however the entire paradigm of "signal buck passing" between different elements of the program and libraries makes multithreading considerably less painful. You can also write a lot of stuff lockless because the signal passing takes care of it.

      --
      Baker's Law: Misery no longer loves company. Nowadays it insists on it
      http://www.sigsegv.cx/
    7. Re:HTML and Javascript? by digitalunity · · Score: 2, Insightful

      That's a good point here in that Qt isn't just a GUI. It's a complete application framework, including threading, super easy mutexes, thread pool automation, multimedia, scripting, etc.

      The GUI is only a small part of the Qt library.

      --
      You can't legislate goodness. Let each to his own destiny, by will of his freely made choices.
  2. Anonymous Coward by Anonymous Coward · · Score: 2, Informative

    Have you checked out vpython? not many people have heard of it and I find it quite usable.

  3. Obvious choice is OpenGL by Anonymous Coward · · Score: 2, Informative

    OpenGL is portable across all platforms, hardware accelerated, and lightweight. Win, win, win.

    Qt would be my next choice but it's not lightweight at all. You can always wrap your OpenGL app with Qt for extra "GUI stuff" if needed. OpenGL works with practically everything.

    1. Re:Obvious choice is OpenGL by TD-Linux · · Score: 5, Informative

      OpenGL? "Lightweight"? Sure, I suppose because it's all implemented in the system, you don't have to redistribute much, but have you actually ever written anything remotely complicated in raw OpenGL? For anything resembling a GUI, the poster is going to spend months of writing low-level code that's been done a thousand times already.

      Qt is heavy, but it's heavy for a reason - it includes a very nice set of tried-and-true widgets, with all the nice features and weird corner cases thought of already. It's also fairly speedy, and even more so if you use QGraphicsView, which can be optionally accelerated via OpenGL for even more speed.

      Qt also has nice support for custom widgets. You can subclass any widget, or QWidget, and make anything you want. You can even integrate your custom widgets with Qt Designer, either by promoting a placeholder widget, or writing a Designer plugin so your widget is WYSIWYG.

      OpenGL is so low level that everything I talked in the last two paragraphs is completely beyond its scope. Even font rendering is rather arduous, and good luck with nicely word-wrapped, formatted text.

    2. Re:Obvious choice is OpenGL by TD-Linux · · Score: 2, Insightful

      Now draw a circle.
      Now draw a bezier curve.
      Now draw a circular gradient.
      Now draw a button with the text "OK" on it.

      If all you want to do is draw some textured quads, it's not terrible. However, textured quads can only get you so far, and what the original poster really wants is unknown.

    3. Re:Obvious choice is OpenGL by coaxial · · Score: 2, Informative

      OpenGL? "Lightweight"? Sure, I suppose because it's all implemented in the system, you don't have to redistribute much, but have you actually ever written anything remotely complicated in raw OpenGL? For anything resembling a GUI, the poster is going to spend months of writing low-level code that's been done a thousand times already.

      Wha? GLUT and GLUI don't exist? Sure they're ugly as hell, but that's a different story.

    4. Re:Obvious choice is OpenGL by Anonymous Coward · · Score: 3, Informative

      Now draw a circle.

      glPointSize(10);
      glColor3f(1.0f, 1.0f, 1.0f);
      float point[2] = {0.0, 0.0};
      glVertexPointer(2, GL_FLOAT, 0, point);
      glDrawArrays(GL_POINTS, 0, 1);

      Now draw a bezier curve.

      float lines[numberOfLines] = {0.0, 0.0, .......}
      glVertexPointer(2, GL_POINTS, 0, lines);
      glDrawArrays(GL_LINES, 0, numberOfLines);

      Now draw a circular gradient.

      uniform vec2 center;
      uniform vec4 innerColor;
      uniform vec4 outerColor;
      uniform float radius;

      void main()
      {
              float dis = distance(center, gl_FragCoord.xy);
              if (dis > radius);
                      gl_FragColor = outerColor;
              else
                      gl_FragColor = dis/radius*outerColor + (radius - dis)/radius*innerColor;
      }

      Now draw a button with the text "OK" on it.

      NSFont *font = [NSFont fontWithName:@"Helvetica" size:18.0f];
      NSDictionary *fontAttributes = [NSDictionary dictionaryWithObjectsAndKeys:font, NSFontAttributeName, [NSColor whiteColor], NSForegroundColorAttributeName, [NSColor blackColor], NSBackGroundAttributeName, nil];

      NSAttributedString *string = [[NSAttributedString alloc] initWithString:@"OK" attributes:fontAttributes];

      NSImage *image = [[NSImage alloc] initWithSize:string.size];
      [image lockFocus];
      [string drawAtPoint:NSMakePoint(0.0f, 0.0f)];
      NSBitmapImageRep *bitmap = [[NSBitmapImageRep alloc] initWithFocusedViewRect:NSMakeRect(0.0f, 0.0f, image.size.width, image.size.height)];
      [image unlockFocus];

      GLint button;
      glEnable(GL_TEXTURE_RECTANGLE_ARB);
      glGenTextures(1, &button);
      glBindTexture(GL_TEXTURE_RECTANGLE_ARB, button);
      glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA, bitmap.size.wigth, bitmap.size.height, 0, GL_RGBA, GL_UNSIGNED_BYTE, [bitmap bitmapData]);

      float rectangle[8] = {0.0, 0.0, 0.0, bitmap.size.height, .....} // Make the button what ever shape you want.

      glEnableClientState(GL_TEXTURE_COORD_ARRAY);
      glVertexPointer(2, GL_FLOAT, 0, rectangle);
      glTexCoordPointer(2, GL_FLOAT, 0, rectangle);
      glDrawArrays(GL_QUADS, 0, 4);

      [font release];
      [fontAttributes release];
      [string release];
      [image release];
      [bitmap release];

      Doing this all in OpenGL then makes it dead simples to animate and tranform and move around the screen.

    5. Re:Obvious choice is OpenGL by Anonymous Coward · · Score: 2, Insightful

      Now draw a button with the text "OK" on it.

      NSFont *font = [NSFont fontWithName:@"Helvetica" size:18.0f];
      NSDictionary *fontAttributes = [NSDictionary dictionaryWithObjectsAndKeys:font, NSFontAttributeName, [NSColor whiteColor], NSForegroundColorAttributeName, [NSColor blackColor], NSBackGroundAttributeName, nil];

      NSAttributedString *string = [[NSAttributedString alloc] initWithString:@"OK" attributes:fontAttributes];

      NSImage *image = [[NSImage alloc] initWithSize:string.size];
      [image lockFocus];
      [string drawAtPoint:NSMakePoint(0.0f, 0.0f)];
      NSBitmapImageRep *bitmap = [[NSBitmapImageRep alloc] initWithFocusedViewRect:NSMakeRect(0.0f, 0.0f, image.size.width, image.size.height)];
      [image unlockFocus];

      GLint button;
      glEnable(GL_TEXTURE_RECTANGLE_ARB);
      glGenTextures(1, &button);
      glBindTexture(GL_TEXTURE_RECTANGLE_ARB, button);
      glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA, bitmap.size.wigth, bitmap.size.height, 0, GL_RGBA, GL_UNSIGNED_BYTE, [bitmap bitmapData]);

      float rectangle[8] = {0.0, 0.0, 0.0, bitmap.size.height, .....} // Make the button what ever shape you want.

      glEnableClientState(GL_TEXTURE_COORD_ARRAY);
      glVertexPointer(2, GL_FLOAT, 0, rectangle);
      glTexCoordPointer(2, GL_FLOAT, 0, rectangle);
      glDrawArrays(GL_QUADS, 0, 4);

      [font release];
      [fontAttributes release];
      [string release];
      [image release];
      [bitmap release];

      Doing this all in OpenGL then makes it dead simples to animate and tranform and move around the screen.

      Or you know, you could do:
      QButton ok = new QButton("OK");;

    6. Re:Obvious choice is OpenGL by Johann+Lau · · Score: 2, Insightful

      Or you know, you could do:
      QButton ok = new QButton("OK");;

      What makes you think one cannot easily wrap that OpenGL into a single function, as well?

      The advantages being it's a billion times faster, and that it just does what you actually need. The disadantage being more work, which in this context -- personal use, learning programming -- isn't even a disadvantage. Reinventing the wheel as *you* need it is a big part of learning to code, no?

    7. Re:Obvious choice is OpenGL by euroq · · Score: 2

      You have just proven my point. Your above code is NOT dead simple; canvas.drawCircle(100, 100, 30) is dead simple. canvas.drawText(100, 100, "Hello, world!") is dead simple. Nor is your above code compatible across all platforms like AWT. For example, glPointSize, or the font stuff used for text, is NOT available on all platforms. Memory management is not dead simple (font release, string release).

      OpenGL is a horrible choice for the OP, per the OP's question.

      --
      Just because the U.S. is a republic does not mean it is not a democracy. Democracy/republic are not mutually exclusive.
  4. How many FPS are you looking for? by CosmeticLobotamy · · Score: 3, Informative

    GDI+ is good enough for low frame rates and trivial to use if you have any C# experience. If these are static controls that need to be painted and then updated on user input, it's more than sufficient.

  5. .NET Windows Forms by peterindistantland · · Score: 4, Informative

    Nothing is easier for amateurs, even though I'm no Microsoft fan.

  6. More information by Dan+East · · Score: 5, Insightful

    You haven't provided nearly enough information. Are you talking GUI interfaces, or rendering? If rendering, is it raster or vector? If vector, then what primitives do you need? Full SVG? Is this real-time, and if so, how many polygons / pixels do you need to push and at what minimum framerate?

    As a totally shoot-from-the-hip, off-the-wall recommendation, I'd say OpenGL for portability, including support on iPhone / iPad / iPod touch. Note that you'll want to stick to the OpenGL ES subset in that case.

    --
    Better known as 318230.
    1. Re:More information by Zmee · · Score: 3, Informative

      Original poster here. I am looking to implement a customized card game (think Magic or Yu-Gi-Oh). This is my step-son's first foray into development, and my first UI requiring any custom controls. (I have done a fair bit of ASP.NET, PHP, and Windows Forms, but most of that is not applicable given what I am planning here). The idea is to be able to create the card images from a combination of stored bitmaps, text, and some general backgrounds. As such, much of the GUI will be vectored, but some must be raster (ie the bitmaps). Note that given the general structure, framerate is not a high consideration.

      Note that I have not ruled out a HTML 5 UI and if I went with Java AWT, I may wrap it as an applet. I would certainly like to stay away from Flash (& am leaning against Java for similar reasons), but have not ruled that out either.

  7. AWT or OpenGL by Philotomy · · Score: 5, Informative

    I'd use Java AWT or OpenGL. They're both cross-platform, and what you learn will can be easily leveraged elsewhere, since they're widely adopted technologies. (No matter what you pick, you're going to have some learning curve.)

    1. Re:AWT or OpenGL by timothyb89 · · Score: 3, Interesting

      Seconded. Swing is (despite what many people around here would like to believe) a very capable GUI library. It's by far the best object oriented GUI library I've come across, with a much more logical API than SWT, Qt, or GTK. Plus, Java2D for raw drawing is incredibly easy to use and it automatically gets hardware acceleration (OpenGL on *NIX systems) so the performance is good. Swing does have a bit of a learning curve, but there's excellent GUI builders for it (e.g. NetBeans) and the API really makes a lot of sense when you learn it.
      If Java isn't your thing, Qt would probably be the way to go. I find the API a bit clumsier than Swing, but the major features (hardware accel, powerful 2D, and cross platform) are there. On the other hand, raw OpenGL has a comparatively huge learning curve and wouldn't have any sort of system look and feel. It would likely be the best performance-wise, though.

    2. Re:AWT or OpenGL by peppepz · · Score: 3, Informative

      Swing's API is just horrible.

      Swing's API is not bad. It allows you to create a working mirrored, 35-rotated radio button with three lines of code. It's true that built-in layout managers suck, but BoxLayout is almost usable. And if you don't like them, then don't use them at all, and fall back to absolute positioning, which is what most other toolkits do anyway. Moreover, the original poster didn't require a widget toolkit, but rather a 2D graphics API.

      For example, why the hell does java.awt.Graphics.drawRectangle() not accept a java.awt.Rectangle as a parameter?

      Graphics.drawRectangle() does not exist. Are you talking about Graphics.drawRect()? It's a legacy API from Java 1.0 which was intended to run on machines where the overhead of converting coordinates into a heap-allocated Rectangle structure could be significant.
      Instead you should use Graphics2D.draw(), which consistently supports any Shape, including a Rectangle. It also supports floating point coodinates, transforms, etc. Please update your trolling to 2005, thank you.

      I do still agree that Java is one of the better choices for cross-platform GUI building, by virtue of not being overcomplicated and error-prone like C++ or unbearably slow like Python; but if this is the best we can do, I weep for the future of the human race.

      Instead, in my opinion Java2D is the most elegant, intuitive and powerful 2D "canvas" API I've ever used. For example, it allows you, with a few lines of code, to load an OpenType font, format a string using it, and convert it to a Shape which can be rendered using the current stroke and fill properties. Any step of the process can be customized using the same API: you can break the string in lines using a layout, you can iterate the vertices of the resulting Shape, you can apply transforms and clipping, the usual Porter-Duff composition, and you can control the rasterization from Shapes into pixels. All of this implemented mostly in pure Java, with fully commented source code available, and it's available out of the box in all Java implementations.

      Tutorial.

  8. FLTK by printman · · Score: 4, Interesting

    FLTK (www.fltk.org) is still in active development and is my cross-platform toolkit of choice - C++-based, easy to use, and works on Windows, Linux, and Mac OS X with ports for other platforms available.

    --
    I print, therefore I am.
    1. Re:FLTK by joss · · Score: 3, Interesting

      I love FLTK, I really do, but .. I dunno, now PySide is around I might have to go over to Qt..just seems that fltk progress is a little glacial and pyFLTK has not been updated since 2009. C++ for everything seems a little painful these days

      --
      http://rareformnewmedia.com/
  9. WPF, Qt, or Python by PhrostyMcByte · · Score: 3, Informative

    Out of everything I've tried (pretty much everything usable from C, C++, and C#), WPF is the best UI framework around. It is extremely flexible and can be very intimidating if you try to learn all the details too quickly, but the basics of it are easy. You should be able to pop out a good design pretty quickly. It's a shame that Mono has no plans to implement it, because everything else feels primitive in comparison.

    If you don't mind dirtying your C++ with a less-than-modern design and ugly preprocessor hijinks, Qt can be a pretty solid framework. Works well on many platforms and is full of features. Has a lot of portable non-UI things too, but I haven't used much of it.

    Python's UI stuff is simple but has a lot of features. Great for quick, portable apps. Easy integration with C++ if you need it.

    I avoid wxWidgets. The last time I tried using it (about a year ago), I ended up very frustrated rooting around their code to find that it makes a bunch of stupid assumptions about things like DPI, default fonts, etc. that fall apart pretty easily.

    I also avoid GTK, but mainly just because it always feels "off" on Windows.

    1. Re:WPF, Qt, or Python by forkazoo · · Score: 4, Interesting

      Out of everything I've tried (pretty much everything usable from C, C++, and C#), WPF is the best UI framework around. It is extremely flexible and can be very intimidating if you try to learn all the details too quickly, but the basics of it are easy. You should be able to pop out a good design pretty quickly. It's a shame that Mono has no plans to implement it, because everything else feels primitive in comparison.

      If you don't mind dirtying your C++ with a less-than-modern design and ugly preprocessor hijinks, Qt can be a pretty solid framework. Works well on many platforms and is full of features. Has a lot of portable non-UI things too, but I haven't used much of it.

      Python's UI stuff is simple but has a lot of features. Great for quick, portable apps. Easy integration with C++ if you need it.

      I avoid wxWidgets. The last time I tried using it (about a year ago), I ended up very frustrated rooting around their code to find that it makes a bunch of stupid assumptions about things like DPI, default fonts, etc. that fall apart pretty easily.

      I also avoid GTK, but mainly just because it always feels "off" on Windows.

      Hmmm... Where do I start. The "Python UI stuff" that you are talking about is probably tk. It's worth noting that you can use tk from many other languages besides python, python wasn't the first language to support tk, and tk isn't the only "UI stuff" that you can use in python. (For example, most of the GUI python stuff I've written has used Qt, which you imply requires working in C++.) For bonus points, you can even try to import Qt, catch an exception if that fails, and use tk to do your UI if Qt is unavailable on the system where you are running. All in one script, extremely portable, and nicer looking than tk whenever possible.

      As for Qt in C++, as an application developer, I don't really care if the build system is a bit wonky. When I put on my architect hat, I can certainly say that Qt is a giant monstrosity that is very different from anything I would have created on my own. But, that sort of philosophical issue doesn't really effect anything when you are making an app.

    2. Re:WPF, Qt, or Python by UnderCoverPenguin · · Score: 2, Interesting

      I also avoid GTK, but mainly just because it always feels "off" on Windows.

      I have heard good things about the FOX toolkit (http://www.fox-toolkit.org/). The Goggles Music Manager was written using this. Looks very Windows-ish on Linux, so I would expect it to FOX based apps to be comfortable for Windows users.

      --
      Don't try to out wierd me, three-eyes. I get stranger things than you, free with my breakfast cereal. --Zaphod Beeblebr
    3. Re:WPF, Qt, or Python by Blakey+Rat · · Score: 2

      I also avoid GTK, but mainly just because it always feels "off" on Windows.

      Understatement of the year.

      I wouldn't say "feels 'off'", more like "is implemented completely backwards and upside-down and nothing fucking works right, not even something braindead-simple like Open dialogs."

  10. Qt by goruka · · Score: 5, Informative

    Having used everything on the list and much more (such as wx, GTK, etc), as well as making my own toolkits for embedded devices and products, my personal experience tells me hands down that Qt is the best choice for anything GUI related. It's power, ease of use, tools, documentation and learning curve are unparalleled to this day and age. Any other toolkit or API I've use fails in one or more of such areas.
    Qt is the only toolkit that made me feel as if they could know in advance everything i'd ever need (so when i go to the docs it's there, right how as i imagined it should be), yet keeping the bloat down with great modularization. I have used it from C++ as well as from Python with great success.

    1. Re:Qt by Anonymous Coward · · Score: 5, Interesting

      I agree with this. Qt is seriously really awesome.

      I've also used everything on the list (Java AWT, Swing, Gtk, C# & .NET Forms, WPF, OpenGL, WxWidgets, MFC, GDI+, etc) and nothing comes even close.

      While some of the things on the list are pretty easy to use (arguably as easy as Qt), they lack something major (such is portability or speed for example). For example, I worked at a place where we used to write some apps in C# due to customer request - it turns out that we had to write several components in native C++, then export the interface to C#. That was the only way we could meet the speed requirements! So much for non-native languages...

      Since version 4.x, Qt library has been modularized into different components (e.g. GUI, Network, XML, etc) and thus it is not bloated as some people are suggesting. A Qt GUI DLL is nothing bigger than WxWidgets one for example.

      The catch is that Qt is a entire framework (something similar to Java Class Library or .NET framework) for building applications. So for example, if you were to use GTK or OpenGL for graphics, you'd have to use another library for threading and another library for network, XML, etc.

      Qt has components for all of those things.

      Oh, I also found that no other framework comes close to Qt when doing OpenGL. There are certain annoyances when programming with GLUT for example, but if you use Qt as a base for OpenGL, you just override couple of functions such are initGL() etc and you have an OpenGL application up!

      It also has excellent tools and amazing documentation! Did I mention that its portable? :)

    2. Re:Qt by Twinbee · · Score: 3, Interesting

      I initially wanted to use Qt for my latest project, but I'm rather concerned at the license which says you can't upgrade to a commercial version of the Qt license if you start the project as the free (beer) LGPL license. It makes no sense because a project may start off small, but then expand later.... and at that point, you can't then use the better (albeit expensive) full license. I moaned about the subject here:

      http://www.qtforum.org/article/34891/licensing-issue.html

      I'm hoping Nokia will adjust their stance on this issue, otherwise .NET/Winforms/WPF looks ever more tempting.

      --
      Why OpalCalc is the best Windows calc
    3. Re:Qt by TD-Linux · · Score: 2, Interesting

      As much as the parent comment looks like an ad, I've used Qt and can say that my experience matches what the parent said.

      I use Qt Creator as my IDE and it's great with the Designer integration. It's not quite as full-featured in some respects to Visual Studio or KDevelop (Qt works with VS as well), but the integration with the documentation and preprocessor makes up for it.

      And the key is of course the documentation. Qt's documentation is possibly the best example of what a doxygen-based documentation can look like. Every class has a multi-paragraph and in-depth description, and most even have one or two code examples.

    4. Re:Qt by simula · · Score: 5, Informative

      What do you want from the commercial license that you aren't getting with the LGPL version?

      The LGPL license allows you to close your product and distribute it without opening your source code as long as you link to the Qt dynamic libraries.

      If you make changes to Qt itself, you are required to open those changes back up, but as long as you utilize dynamic libraries, you can make your app as closed as you want.

    5. Re:Qt by QuantumG · · Score: 2, Interesting

      I love the way people say this stuff about the LGPL.. have you ever actually read it? This is the bit you're probably referring to:

      6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.

      The newer version 3 of the license has more clear wording, which are actually more restrictive.. permitting modification of only the library not the combined work.

      In either case, every time you say "you can link to LGPL licensed libraries without having to do anything!!" you're inviting people to violate the author of that library's license.. I'm sure they appreciate it.

      --
      How we know is more important than what we know.
    6. Re:Qt by Anonymous Coward · · Score: 3, Informative

      Please don't mod this informative, the GP's interpretation is correct.

      > http://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License#Differences_from_the_GPL

    7. Re:Qt by ByteSlicer · · Score: 2, Informative
      Have you actually read it?

      5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.

      So linking to the QT dynamic libraries does not put any restrictions on your own program. You are however still required to distribute the QT parts as specified by the LGPL (provide the code and such).
      Only when using static linking will your code be a derived work, and be bound by the same license.

    8. Re:Qt by ByteSlicer · · Score: 5, Informative
      Dynamic linking is certainly possible with the QT libraries.
      Just because your C++ applications contains some function signatures, symbols and constants from the QT API doesn't make it a 'real' derived work, since this is using the library as intended.
      One part of LGPL section 5 states this:

      If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work.

      On the GNU website you can find the official standpoint on this matter.

  11. Qt by simula · · Score: 5, Informative
    If you are comfortable with C++, I heavily recommend the Qt framework.
    • There is an LGPL ide Qt-Creator that has an integrated form designer.
    • The code you write is amazingly cross-platform.
    • The framework is amazingly comprehensive for when your needs expand.
    • There are top notch learning resources, including excellent books.
    • The Qt framework is LGPL.

    I use the Qt framework at home and at work and I have published a couple teeny GPL'd apps:

    Regardless of which framework you decide to use, I wish you luck!

  12. WPF by gadzook33 · · Score: 2, Interesting

    I have extensive experience using Qt under both linux and windows (5+ years), as well as WinForms. However, for the last year I've been using WPF and I think it's a dream. Granted, there are cons to it and if your bottom line is performance in all situations (e.g. this is a game) then I would avoid it. They talk a big game about high object counts, but it requires extensive virtualization and time and then it still might not work depending on what you're trying to do. That being said, WPF's use of binding is fantastic and if you do a little bit of homework on binding I think you'll be pleasantly surprised. Don't get me wrong, I love Qt (and C++ for that matter!). But for the amount of stuff I need to crank out, it's tough to beat WPF. One last caveat: I wouldn't count on Mono to bring your apps to linux. I've only spent a little time with mono, but unfortunately (in my opinion), the linux community seems to have largely shunned C#, .NET and all that goes with it.

    1. Re:WPF by wasabii · · Score: 2, Interesting

      The whole 'recursively templated tree' thing is really ingenious. It sets it quite a bit apart from the single tree model of all the other frameworks I'm aware of.

  13. More info needed by BitZtream · · Score: 3, Insightful

    If you want 'easy' with a slightly 'limited' set of options long term, then I would say Windows Forms in a .NET language, use Mono rather than VisualStudio so you have a much easier chance of it working in Linux out of the box, and most likely OSX, FreeBSD and several others in the process. Its not required, but Mono's code completion will point you in the right direction where as VisualStudio is going to point you more towards MSy things. Though VisualStudio is much more enjoyable to use in my opinion. If you've never used either, its not likely to matter for a while I suspect, though on OS X, Mono seems to miss most initial clicks I send to it, could just be me.

    That will give you all the basic controls an application gui will need and make it so you can reuse the massive amount of examples out there.

    For your custom painted widget its a little different. What kind of painting are you doing?

    Is it something that lends itself to OpenGL really well? If its fits well into geometric primatives, then I would go with OpenTK's OpenGL Control. Works pretty good in my experience.

    How often does it update the displayed data? Is it a game/animation kind of thing or are we talking about something that renders once after the user changes a setting?

    If you need a high FPS on the updates, you're going to want to use OpenGL with textures for displaying the rasterized data. You're learning curve will be a little steep I think if you're starting from no knowledge, but its probably your only solution for something that needs to be fast (I'm just flat out ignoring DirectX, which for Windows would be easier than OGL but would cut you off of Linux and the advantages on Windows aren't that great really)

    If you have real slow update rates, then you could just throw a image control on a form and paint the pixels yourself one at a time, or load images from a file/resource.

    If this is a project that has a long expected life and will become rather complex and need high performance eventually, then you're probably going to do it wrong the first time no matter WHAT you do now, at least, thats my experience. I never get it right until AT LEAST the 3rd rewrite :/

    --
    Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
  14. He's looking for drawing, not a toolkit! by spitzak · · Score: 4, Insightful

    Stop suggesting various toolkits, that is NOT what he is looking for.

    He is looking for a "canvas" widget, meaning he wants drawing API.

    It is unfortunate that most drawing apis are tied to particular toolkits, so he may have to choose one, but if you are comparing them you have to compare the 2D drawing primitives.

    There is also Cairo and OpenGL, which are not really tied to toolkits. Though you still need to jump through hoops depending on the toolkit to get it so the graphics calls draw where you want. Sigh.

  15. I second this, OpenGL and QT are both great. by joetainment · · Score: 5, Interesting

    I second the parent post. However, in my opinion, OpenGL only is pretty tough to use. It takes a lot of knowledge. (GLUT can help to get you started.)

    Where OpenGL would require you to program too much functionality from scratch, I personally recommend QT, using OpenGL only where you need it. QT is easy to learn, easy to code for, provides *tons* of functionality, and it performs great. In fact it performs well enough for very heavy 3D animation software to rely on it. (Maya has now been rewritten to use QT, and it is a big improvement.) You can paint your own custom anything, and even easily integrate 3D into your project. I really can't say enough good things about QT. It is now available under the LGPL, so you can use it for open source or closed sourced projects.

    As mentioned above by the parent, QT isn't lightweight, but it isn't a pig either. You can use as much or as little of the toolkit as you like, and it can run very fast and have very low overhead. It is light enough that Nokia is using it as their primary development framework for mobile apps with their upcoming Meego based phones. From my personal experience QT flies.

    Also, I've had great results with PyQt and with PySide. PySide is the new, "official" binding for QT on Python. They have examples in their demo folder of custom canvas based applications, and they work great and are easy to follow. You can have your own similar program, written from scratch in Python, up and running in 10 minutes.

    It should also be noted that because QT works so well cross-platform, it has a huge advantage over toolkits that are tied to a single operating system. (Particularly those from MS.) In my own work, I won't even consider using something that doesn't run on Windows, Mac, Linux, and potentially more operating systems. I use all kinds of devices, and I don't want to be tied down. QT makes cross platform development straightforward, and software like Autodesk Maya is proof that it works even for highly complex projects.

    I know I'm starting to sound like a salesman, but my experiences really have been that positive. About the only downside is that there aren't current C# or Java bindings for it. This doesn't matter to me though, because I've got C++ where I need performance and Python where I want ease of use. (With Cython, you can easily have performance and ease of use at the same time.)

    I hope that helps.

    1. Re:I second this, OpenGL and QT are both great. by BotnetZombie · · Score: 2, Informative

      Good post, just wanted to add that there are bindings for Java available, see here

    2. Re:I second this, OpenGL and QT are both great. by frodo+from+middle+ea · · Score: 2, Informative
      About the only downside is that there aren't current C# or Java bindings for it.

      Umm... Qtjambi (QT's Java bindings) has been available for ages, although recently Nokia transferred the ownership to community, but from the looks of it, the community is very active and the releases are on track.

      --
      for the last time people, I am "frodo from middle eaRTH", not "middle eaST".
  16. Swing + Java2D by SplashMyBandit · · Score: 4, Informative

    Who suggested Java AWT? What is this, 1998? Someone is behind on their homework :).

    Java's Swing + Java2D is *fully hardware accelerated* (ever since Java 1.6.0_u10 some time ago), multi-platform, with good multi-thread support (not for rendering, you don't need that, but for the rest of the program), very customizable, and looks fantastic with the Nimbus look&feel (a standard part of Java). Swing is used a lot on the enterprise desktop (and a few shrink wrapped products too - I know I've purchased some as they were best-of-breed tools). Many of the Java Swing ttools are free and there are a lot of them (eg. Matisse in Netbeans makes creating GUIs a snap). Java2D had extensive contributions from Adobe who happen to know a thing or two about presentation. Plus, drawing in Java2D also allows printing relatively simply.

    1. Re:Swing + Java2D by Philotomy · · Score: 2, Informative

      Java2D is part of AWT (take a look at the Java2D API and its packages). Ultimately, Swing is built on top of AWT (yes, even the lightweight widgets). The OP was talking about drawing "custom objects" on a canvas, which sounds more like custom painting using Java2D rather than making use of widgets. For a widget-based UI, I think you're right on the money suggesting Swing. For painting custom objects, you're going to be using classes in the java.awt.* package.

    2. Re:Swing + Java2D by SplashMyBandit · · Score: 2, Interesting

      Thanks. It might be in the AWT package but if he was limiting yourself to only AWT then I suggest he's not considering the possibilities that Swing adds above AWT. Colouring the pixels on the screen is only part of it, you also need buffering and layers (the handy GlassPane) etc to do cool stuff (drawing with some of the concepts of 'Filthy Rich Clients'). Hence, I mention Swing as good for drawing above and beyond the confines of AWT.

      What I forgot to mention is that you can mix OpenGL with a Swing canvas for your drawing (you need somewhere to draw after all) and it is pretty seemless thanks to JoGL. So, start with Swing technology and adding 3D over your 2D is very straightforward. While you can use JoGL with AWT it is again best integrated with Swing.

    3. Re:Swing + Java2D by SplashMyBandit · · Score: 3, Informative

      Incorrect on both counts.

      Swing was designed to use a minimal amount of AWT (to set up a rendering contents and basic window and event management). Most of AWT is deliberately not used by Swing to reduce platform-specific issues (nb. one of the reasons Swing was invented was to bypass the limitations of AWT). Swing renders using Java2D rather than the native widget rendering of AWT.

      The "Java2D is AWT" statement is incorrect. Java2D used to be a software library for rendering to a context. It is now fully hardware accelerated via DirectX or OpenGL shaders (depending on the host platform and pipeline selected). AWT includes Java2D but also a whole bunch of other stuff for window management, host system interaction, event management, input management etc etc. So, AWT includes Java2D but it is *not* the same as Java2D.

      Does that clarify it enough so you can see the inaccuracy in your statements?

  17. Re:properly abstract your UI and it won't matter by TD-Linux · · Score: 2, Insightful

    While this can be a great thing, if you do this for the sake of separation, you'll do it wrong.
    When separating your OS-dependent code, many people make a nice wrapper library for the various toolkits. This is a great way to reinvent the wheel yet again.
    However, if you program is oriented around the GUI (a file manager, IRC client, etc), there is no good reason to separate GUI... you'll just end up with a poorly documented GUI abstraction layer. You'd be better off using any other portable GUI toolkit.

  18. Quick n dirty. by noodler · · Score: 2, Informative

    I haven't got a clue what kind of app you want to write, but have a look at Processing.org .
    It's an abstraction layer built on top of Java (cross platformity, including web browsers).
    It has loads of handy stuff for 2D and 3D, including OpenGL.
    Talking about OpenGL, you can use it in it's raw form as well.
    In fact, you can just write in Java afaik.

    I found it very usefull for making custom ui's.

  19. Qt has flaws by valkenar · · Score: 4, Informative

    I use QT and love it too, but it has some serious drawbacks, from my perspective. The biggest is that it requires a wonky special compilation system. You either have to use the build system they offer (qmake) or you have to manually run their generator yourself (moc - though if you were a masochist you could learn to write out the files moc makes yourself and avoid using it).

    I compare every IDE to Eclipse, because that's the best IDE I've seen for any language. But I've never found that CDT, the C++ plugin for Eclipse, is any good. It fails to work out of the box for me and is a pain to configure (but I haven't tried it in a few years). QT Creator, while usable, is really an immature product. There's no support for refactoring, the UI is unintuitive and awkward (for me, at least) and there's lots of little issues with it. Plus you're committed to MingW, which can be a problem depending on what libraries you want to use. Codeblocks is a pretty good IDE, but it doesn't have a QT plugin, so you're left with the problem of dealing with moc files. Visual Studio has a plugin, but it only works with the paid versions.

    All of this can be dealt with (and I do) but it's annoying.

    1. Re:Qt has flaws by TD-Linux · · Score: 3, Informative

      The "wonky" compilation system isn't bad, and the benefits it provides overcome any ideological "oh my we are corrupting the pure and wonderful C++" feelings that I might have. It's really easy to integrate into CMake, and it doesn't matter with autotools, because everything is hard with autotools.

      I also don't know where you got the idea that the VS plugin works only with paid versions. It works fine with the LGPL plugin for me.

    2. Re:Qt has flaws by wssddc · · Score: 2, Informative

      I also don't know where you got the idea that the VS plugin works only with paid versions. It works fine with the LGPL plugin for me.

      It's a paid version of Visual Studio that is needed. The plugin refuses to install if you only have the free VS Express.

  20. Easy Choice by fean · · Score: 3, Informative

    Adobe Air -
    Easy UI interaction framework, very powerful drawing APIs, runs on windows/linux/mac/android.

    http://www.adobe.com/products/air/

    Latest version lets you call native apps on windows/linux/mac.

    1. Re:Easy Choice by Alex+Zepeda · · Score: 2, Insightful

      And also really, really bloated memory usage, widgets that don't act like native widgets, and the ability to make use of my laptop's nifty fan like no other. Seriously. Two hundred tabs in Firefox, and the laptop would remain quiet. Open up an AIR app and... it gets hot and the fan goes nuts. Take a look at most of the desktop Twitter clients as an example. TweetDeck is a good one because it highlights most of my issues. It runs on OS X, but not well. I was able to put up with using ~1gb RAM for a small data set, but couldn't handle with the constant stealing of keyboard focus. TweetDeck does these nifty little notifications (similar to Growl for native Cocoa applications) to tell you of significant events that happen while it is in the background. Sure, they look pretty, but they'd managed to grab the input focus roughly every other time they popped up. Sure you could type into the input boxes, but they standard OSX keyboard navigation shortcuts didn't work. IIRC the widgets didn't handle scroll wheel (or touchpad) inputs properly either. In short, the application felt like it was written by a two year old. With the exception of the notifications (which no other AIR app I've tried has dared to do), the complaints are eerily similar.

      Maybe AIR attracts incompetent developers en masse. Or maybe AIR just puts the lowest in lowest common denominator. It may be a breeze to develop with, but you're putting your end users through the ringer if you go with the Adobe route.

      --
      The revolution will be mocked
  21. For "personal" Apps by ratboy666 · · Score: 4, Informative

    I don't have much time... I write the GUI, and any drawing logic with Tcl/Tk. Easy, portable. Any time critical or extensive logic gets pushed into C or FORTRAN (depending on what it is). Just standard in/standard out. Parse the output with Tcl, and display.

    A recent example -- I needed to upgrade some systems for a client (Solaris 6 to 10). We needed to identify the binary parts (non-OS) that needed to move. I wrote a GUI tool (binport) for this. Took 2 days to write, ran on Linux and MacOS X (two of us shared the work). After the job, the tool was essentially discarded.

    No time to "debug" really, and I don't typically have time for compile and test cycles. Tcl is an interpreter, with very simple syntax and semantics.

    Other examples that have used Tcl/Tk -- the GUI layer for GDB, Redhat Source Navigator, etc.

    Yes, it's not "sexy", or even particularly "new", but it works, and works well.

    --
    Just another "Cubible(sic) Joe" 2 17 3061
    1. Re:For "personal" Apps by Bent+Spoke · · Score: 2, Informative

      Beyond basic Tcl/Tk, you might look at Wize, which includes 3 canvas options:

      • Canvas: with image tiling support added
      • Tkpath: Canvas based on SVG (backends Cairo, GDI, CoreGraphics)
      • Canvas3d: for OpenGL (not relevant here)

      Wize is under BSD licence, has minimal dependencies and offers pre-builts for Linux-i386 and Windows.

      Disclaimer: I am a Wize developer

  22. Re:The answer by Anonymous Coward · · Score: 5, Funny

    I'll create a GUI interface using Visual Basic, see if I can track 2D canvas objects.

  23. JAVA + SWING by tgetzoya · · Score: 5, Interesting

    Personally I prefer Java + Swing. Add Java2D and you have everything you need. If you want it to look native, there's a way to do that. It will run everywhere Java is available and since you say this is a personal application you don't need to worry about end-user problems. Plus, if you ever want to get it to work on Android or Blackberry phones then you'll already have a head start.

    I'd also recommend using SpringLayout, it's the simplest way to get things looking right.

  24. Re:The answer by TeXMaster · · Score: 4, Informative
    My kingdom for a mod point!

    (For those that missed the reference, this is it)

    --
    "I'm never quite so stupid as when I'm being smart" (Linus van Pelt)
  25. Also, don't forget Qt Quick and QML by okoskimi · · Score: 3, Informative

    Qt has recently introduced Qt Quick, a collection of technologies meant to help you create animation-rich UIs similar to those used on touch phones. The most important part is the QML language, which is used to describe the user interface of a program. QML is declarative and animation-friendly, and makes it easy to create fluid interfaces. On the downside, it is not mature yet and lacks most of the standard UI widgets at the moment (basically, you have text input and clickable areas). I wouldn't have recommended it for general application writing just yet, but the original question was not very specific on the requirements so it might be suitable already in its current form.

  26. I use wxWidgets by GeckoFood · · Score: 3, Interesting

    I have had good success with wxWidgets on both Windows and Linux. That said, it's the *only* cross-platform GUI development library I have used and I am used to it. Rather than use anchors for placing window components it uses something called sizers which are a lot harder to work with until you get used to them. It can be used with a variety of languages (C++ and Python are the two big ones, though there is support for hooking into Java as well) and the licensing is sane.

    Though I do favor wxWidgets (as it's all I really know) I believe QT is a lot more complete as a library. Depending on what you're doing, QT may be a better fit for your needs.

    --
    Be excellent to each other. And... PARTY ON, DUDES!
    1. Re:I use wxWidgets by g4b · · Score: 2, Interesting

      I have done a kiosk like application for a bigger university in the past, which is based on wxPython entirely. It still runs on those machines until today and does its job very well. Its a rather big app.

      For most simple applications WX does suffice. However, I had to do of workarounds and finally ended up "abstracting" wx to our needs, mostly because some tests showed, you can crash wx in the background unfortunately in some circumstances. (just do a lot of sizers and tell him to apply them very fast)

      In my eyes, developing a bigger GUI app always needs an abstraction layer between the engine you use and your application. certain windows look the same, behave the same, hence, are the same. It would not have been that hard in the end to switch the abstraction layer to use Qt and just replace certain points in the code, where wx is directly used to switch the whole app.

      Also, destroying windows in WX is kinda funny in python sometimes, e.g. - I ended up doing it with timers, who triggered the destruction later, because we ran in a lot of problems (might be python related)

      wx is really easy to work with, but it can get a mess.
      I admit, I dont know Qt in extensive projects, but I do know that Qt editboxes sometimes slow down on my machine and only speed up upon window resize in kde komponents (sic). Could be kdelibs / X11 / whatever however.

      I am wondering how many ppl actually come forward with Qt here, while GTK seems every geeks choice in some other /. threads. I would certainly choose Qt, but I think it is a little bit harder to learn, than WX. I would choose Qt mostly because its very complete, proven to work, and it just looks a lot nicer optically (no matter how you skin it), than GTK. But that is obviously a stupid reason for many ppl :)

  27. Re:properly abstract your UI and it won't matter by amn108 · · Score: 2, Insightful

    Nicely abstracted UIs and awesome user experiences are two orthogonal concepts.

  28. Re:The answer by ChipmunkDJE · · Score: 2

    I'll create a GUI interface using Visual Basic, to see if I can give you some mod points.

  29. Curses by Antique+Geekmeister · · Score: 2, Interesting

    Or ncurses. Or maybe flat HTML. Most sophisticated interfaces can be done with a bit of thought and caution in flat-text compatible formats that work very well with even the most modest text screens or flat text browsers. This makes them more robust, takes far fewer client resources, makes them more stable, makes them more portable, and avoids sophisticated GUI's with options and features that serve only to gratify the designer's wish to prove their sophistication, rather than actually get any work done. It also makes the tools accessible to visually impaired people, who may have trouble distinguishing sophisticated borders and popups that only work with certain browsers in certain modes. Fancy popups are often illegible to tired staff, and contribute to RSI.

    A few years ago, I went through this this with a very expensive, very powerful system configuration tool absorbed thousands of hours in in-house engineering time trying to stabilize it and get it to actually follow our workflow, and was eventually thrown out in favor of Webmin. That project had wonderful plans, and resource allocations, and milestones, and Powerpoint slides, and managerial sponsors, and everything. But it _never worked_.

    Use GUI's when you have to. Keep them simple, use well established tools, but don't design your own just because you can. Small changes to an existing tool that is similar will be a lot more stable than starting from scratch, and you can often get your changes implemented upstream to expand the existing tools as needed.

  30. Processing by gbridge · · Score: 2, Interesting

    I'd suggest Processing. It's great for putting apps together quickly, has all the basic 2D tools you'll need, plus support for fancy-pants 3D stuff if you want it later. Great community and docs, too. Works on Windows, Linux and Mac.

    http://www.processing.org/

  31. Re:Curses AMEN! by wagadog · · Score: 2, Insightful

    I've never seen a gui project that didn't get bogged down in the problem of the PMs and everybody down to the second owner's third wife wanting to repaint the bike shed a different color, and change the workflow at the same time, while all the time confounding the issues they create even further by not knowing the difference between the two.

    If the problem is actually somewhat complicated, implement each action as a straight-to-the-shell command line interfaces, invoke them on the server side via python or perl with apache on top -- and let some poor sucker straight out of college do the gee-wiz gui dance.

    This way you get your own work done, and can create a solid platform for whatever craptastic client interface they come up with -- and the data can still be maintained, the QA on the actual backend algorithms can be implemented, and at least *you* have accomplished something on time and under budget.

    Let the kiddies who made the mistake of getting into GUI at all fight their own way out of it.

  32. choose Qt only after careful consideration by NuShrike · · Score: 3, Interesting

    I vote against using Qt. Having used and hacked it extensively (up to 4.8, or the master branch in git), Qt is way overboard for any simple project.

    1 QtCreator is good as a common-platform IDE vs Eclipse, but cannot be used as a selling point for programming IN Qt
    2 the code ISN'T as cross-platform as many would like to lead you to think because most here only did some simple apps in it, not full-blow production and public releases
    3 the framework is TOO comprehensive and doesn't have a modular substructure to rip out unnecessary bloat; the MFC class structure lends to that bloat
    4 it is easy to learn, but requires wrapping your head around weird idiosyncrasies of core elements that are poorly explained in the documentation and require trolling through the immense amount of source
    5 Qt's problem reporting system pretty much buries any bugs or fixes you contribute that they don't personally like

    Expanding on #2 and #3: Qt is only truly portable between Linux/MacOSX/MSWindows. It really sucks on embedded/smallMemoryCpu as they stopped supporting their qconfig modularization since 4.5. Ex. For Windows Mobile and other embedded, the smallest footprint is 12MB MINIMUM (Core, Gui, OGLES). That's > 50% of the entirely virtual memory available to a single WM app -- for a hello-world in OGLES.

    Qt uses a strict single-tree (MFC) inheritance class hierarchy (instead of recursive templating due to legacy and hard-noses) which means code for everything ends up in the shared library, used or not. It's software rasterization most of the time and then hardware-accelerates the results, so it's not a true opengl renderer. You'll have to rewrite it yourself to clean it up. This means it has some speed but a lot of bloat in code and texture memory.

    Their MOC is a nice alternative to ObjC, but it's a flawed design decision that didn't bet on the templating abilities of C++ modernization. Boost and Boost signals2 is a less magical alternative to Qt's signaling system.

    If it was truly portable on mobile, why is it used extensively ONLY on Nokia products? There's few to zero examples for Symbian and Windows Mobile, and it's not ported to Android/iOS. This means you're already limited if you invest in Qt.

    Their QGraphicsView canvas drawing layer is still immature and is still NOT multi-thread compatible (as much of Qt). This means you have to work your way around it a lot of times, or avoid it completely (and still can't compile out the software renderer) especially if you wanted a fancy multi-threaded renderer, or simply just loading textures in one thread and then drawing it in a master draw thread.

    I strongly recommend going with a lighter, less drama foundation such as Clutter (which is MORE portable than Qt), SDL, or the bindings some languages provide such as gtk.

  33. #include <curses.h> by SpaghettiPattern · · Score: 2, Funny

    #include

    Nuff said.

    --

    I hadn't the slightest objection to his spending his time planning massacres for the bourgeoisie... (P.G. Wodehouse)
  34. Re:JavaFX succeeds Swing for rich GUI development by SplashMyBandit · · Score: 2, Informative

    Except that JavaFX is less powerful than Swing. They're meant for different purposes.

    One (JavaFX) is simplified and really intended for the web and web developers who can get away with less complex interfaces (since the expectations for interactivity on the web are so low compared with expectations on the desktop). The default set of controls for JavaFX have even more omissions than the default set for Swing (which both SwingLabs and the marketplace make up for fortunately).

    On the other hand Swing is comprehensive and powerful. It is too much for many, but if you know how to wrangle it there is no substitute. If you want to *deeply* customize your controls you have the power to do so (many frameworks, eg SWT, WinForms etc have nice defaults, but once you start trying to extend them it gets very painful - moreso than Swing in my experience). I understand many hate Swing because of it's complexity or it doesn't work exactly as the Win32/WPF APIs do, but for me personally it is brilliant for multi-platform work and not yet found anything else that can touch it for sheer flexibility and customization.

    So, while JavaFX is an option I don't think it is a generic solution to all classes of GUI problems (if you are going to invest time, effort and money you might as well use a 'swiss-army' toolkit that can apply to many problems).