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."

331 comments

  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 Anonymous Coward · · Score: 0

      WinAPI/GDI+

    3. 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/
    4. Re:HTML and Javascript? by WidgetGuy · · Score: 1

      Don't forget CSS (and SVG). A subset of SVG is supported by all major browsers except (you guessed it) IE (though IE 8). Fortunately, there are plug-ins available for IE (Adobe still offers an unsupported plug-in and another can be obtained from Examotion).

      An excellent book that covers mostly CSS2/3, as well as SVG as implemented with CSS2, is "Advanced CSS" by Joseph R. Lewis and Meitar Moscovitz, 2009, FriendsofED books (ISBN 978-1-4302-1932-3) retail price $40.

      --
      One "Aw, Shit!" is worth 100 "Ata boys!"
    5. 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.

    6. Re:HTML and Javascript? by Anonymous Coward · · Score: 0

      Mod the parent up! I've been developing software professionally for about 15 years and I've developed for several GUIs and html5 is going to be ubiquitous...cross platform, check. It has canvas support and you can do open gl in the canvas, check. Offline storage, check. No client installs, check. You can even do some pretty sweet offline stuff. So, IMHO, go with html5.

    7. 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
    8. 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.

    9. Re:HTML and Javascript? by Robert+Zenz · · Score: 1

      You care to elaborate your opinion about GTK?

    10. Re:HTML and Javascript? by mcrbids · · Score: 1

      As a GTK developer, I have to say I don't get your lack of love for it! I've found GTK to be a useful, powerful, cross-platform toolkit with excellent image manipulation capabilities. (And it should, it's what GIMP was written with!)

      Other than your silly Yoda reference, you give no reason: why the hate?

      I might agree that for many projects, QT would be better, but even it has well-known bugs and documentation limitations on various platforms! The truth is that Win/Mac/Lin are all separate platforms with different primitives, strengths and weaknesses. QT tries to shove all that under the rug and pretend they are all the same and hide all that from the programmer by gluing events to O/S specific primitives, making it easy to get things going but making it harder to get things to work consistently across platforms. GTK, on the other hand, ignores the differences between platforms and implements its own primitives, so it looks "a bit wrong" on every platform except Linux. (where, it could be said, everything looks "a bit wrong")

      Personally, I prefer the "it looks the same on all platforms" approach where, although my Macintosh version doesn't look like other Macintosh programs, it does look like the screenshots in our training manual, which were taken on Windows.

      --
      I have no problem with your religion until you decide it's reason to deprive others of the truth.
    11. 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/
    12. Re:HTML and Javascript? by ByOhTek · · Score: 1

      I'll non-AC second this one. Using Visual Studio 2010 Express, it's very easy to make something with this. Using Mono and LibGDIPlus, I've only had one issues getting apps to run in Linux or FreeBSD. That issue was - I didn't change the project settings to target the .NET 2.0API. Once I did that, everything worked fine.

      If it can be done HTML+Javascript is also not a bad option - I use JQuery for that kind of thing.

      And I've used Python + QT (mentioned by the GP), which works well, and is pretty easy, but not as easy as C#/VS2010.

      --
      Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
    13. Re:HTML and Javascript? by ByOhTek · · Score: 1

      Another good option is JQuery. I've used that a lot, and never had compatibility difficulties between IE/FF/Opera/Chrome except:

      A couple Javascript string/array functions missing from IE or FF (I have a compat.js I use, which adds the three functions I have issue with to the string and array prototypes), IE cannot index strings (i.e. x="cat";alert(x[2]); is an error in IE, works in others), and IE barfs if there is a comma after the last element in a object definition (i.e. {a:"a",b:"b",c:"c",})

      --
      Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
    14. Re:HTML and Javascript? by digitalunity · · Score: 1

      I've been using Qt for a few years. The API is really nice, with just a couple of bad exceptions.

      It's buggy though and bugs don't always get fixed quickly.

      I have had problems with Mono. It's not production ready yet IMO.

      --
      You can't legislate goodness. Let each to his own destiny, by will of his freely made choices.
    15. 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.
    16. Re:HTML and Javascript? by bill_mcgonigle · · Score: 1

      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.

      Why hasn't this been fixed?

      --
      My God, it's Full of Source!
      OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
    17. Re:HTML and Javascript? by t2t10 · · Score: 1

      Making modern multicore apps with Gtk+ is easy. If the GUI library constrains you, you are using it wrong.

    18. Re:HTML and Javascript? by badkarmadayaccount · · Score: 1

      I wonder if anyone has considered using Qt as the OS API.

      --
      I know tobacco is bad for you, so I smoke weed with crack.
    19. Re:HTML and Javascript? by H0p313ss · · Score: 1

      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.

      This way lies madness! Repent!

      --
      XML is a known as a key material required to create SMD: Software of Mass Destruction
  2. The answer by Anonymous Coward · · Score: 1, Funny

    Microsoft Foundation Classes

    1. Re:The answer by Anonymous Coward · · Score: 0

      Don't you mean, "Microsoft's F-ed-up Classes"?

    2. 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.

    3. 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)
    4. Re:The answer by Weaselmancer · · Score: 1

      I always think of the Coffee Talk lady when I think of Visual Studio.

      "Visual studio is neither visual nor is it a studio. Discuss."

      --
      Weaselmancer
      rediculous.
    5. Re:The answer by shutdown+-p+now · · Score: 1

      You might want to hire a psychotherapist in advance, though.

    6. 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.

    7. Re:The answer by Anonymous Coward · · Score: 1

      My new favorite slashdot joke. I'll try to use it in every thread. It's much better than those old "in Soviet Russia" jokes.

    8. Re:The answer by Saint+Stephen · · Score: 1

      Mfc and gdi are similar to Gtk and Gdk. Pango is rather unique, tho some of Gdi+ is similar.

      I guess Mfc probably has more obtuse macros tho

    9. Re:The answer by Anonymous Coward · · Score: 1

      Thanks for the laugh. I don't watch CSI, so I totally missed this. Thumbs up for the video.

    10. Re:The answer by Barryke · · Score: 1

      `GUI Interface is the reason i do not watch tv. Now wheres my kingdom?

      --
      Hivemind harvest in progress..
    11. Re:The answer by gnapster · · Score: 1

      In Soviet Russia, an IP address uses Visual Basic to create a GUI interface to track YOU!

      Am I doing it right?

    12. Re:The answer by ByOhTek · · Score: 1

      You have a drag-and-drop GUI design tool - visual. A studio is a work room for a class of task - it is effectively an electronic studio.

      --
      Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
  3. 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.

  4. 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 thisisauniqueid · · Score: 1

      Yeah but it's a royal pain to write anything nontrivial in straight OpenGL.

    2. 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.

    3. Re:Obvious choice is OpenGL by euroq · · Score: 1

      No, it is not the obvious choice.

      First of all, OpenGL is a 3D framework. He is looking for a canvas to paint custom objects, and OpenGL is very hard to do 2D operations. He doesn't seem to need 3D operations at all. When you say "lightweight", what you mean is it does not have very much functionality. It barely has any canvas functions such as draw line, oval, etc. Finally, OpenGL is not nearly as easy/quick to learn as the other frameworks he mentions.

      In short, OpenGL is a horrible choice for the original poster.

      --
      Just because the U.S. is a republic does not mean it is not a democracy. Democracy/republic are not mutually exclusive.
    4. Re:Obvious choice is OpenGL by Anonymous Coward · · Score: 0

      and OpenGL is very hard to do 2D operations.

      Are you sure you've used opengl before? Because 2d operations are retardedly easy, even if you don't use glut.

    5. Re:Obvious choice is OpenGL by Anonymous Coward · · Score: 0

      It's really easy to do 2D in OpenGL. z = 0 That's all you have to do. Or just use only 2 vertexes.

    6. 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.

    7. Re:Obvious choice is OpenGL by hairyfeet · · Score: 1

      Which is the problem with these "Ask Slashdot" sections...they just never give you enough info. There should be more of a Q&A with these things, so we can get more detail like what EXACTLY is this thing gonna do? After all a 2D network monitor is gonna have different requirements than a DB frontend. Is it gonna be networked, or a local app? How fast is it gonna update the GUI?

      Without some serious detail these things remind me of my youngest asking for a game "Well what game do you want?" 'It has a girl, and battles...ohh and magic' Yeah, thanks a lot, really helpful.

      --
      ACs don't waste your time replying, your posts are never seen by me.
    8. Re:Obvious choice is OpenGL by whiteboy86 · · Score: 1

      He probably meant GLUI that is distributed along with most OpenGL packages. You get your usual TextEdit, SpinBox, ListBox etc. directly in OpenGL, the interface is clean and dumbed down enough, plus you get the benefit of close to the GL-API implementation.

    9. 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.

    10. Re:Obvious choice is OpenGL by G3ckoG33k · · Score: 1

      Which leaves us with Qt I guess.

    11. Re:Obvious choice is OpenGL by G3ckoG33k · · Score: 1

      Which leaves us with Qt after all I guess.

    12. Re:Obvious choice is OpenGL by thisisauniqueid · · Score: 1

      Well -- with Qt you trade off the royal pain of the API for the royal pain of Qt's native language. (Yes, I know there are bindings for other languages.)

    13. 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.

    14. Re:Obvious choice is OpenGL by Bozzio · · Score: 1

      Or, be a trailblazer and use OpenGL with Mono's implementation of WinForms. It's still a win-win-win situation, and you're also supporting a really interesting project :)

      --
      I just pooped your party.
    15. Re:Obvious choice is OpenGL by amn108 · · Score: 1

      I don't think he/she knows that 2D is a plane in 3D space ;-)

    16. Re:Obvious choice is OpenGL by gbjbaanb · · Score: 1

      there are 'higher-level' GUIs written in opengl too - Plib's PUI for example or other 'game' programming environments. Its easy to reuse their code for LoB GUIS, and you can add some great effects added in there when needed too :)

    17. 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");;

    18. Re:Obvious choice is OpenGL by Anonymous Coward · · Score: 0

      I wasn't referring to a GUI toolkit when I said lightweight. The original post is about 2D drawing on a canvas. OpenGL is lightweight for that.

      My second suggestion of Qt was if they wanted a GUI framework.

    19. Re:Obvious choice is OpenGL by timeOday · · Score: 1

      Wha? GLUT and GLUI don't exist?

      No, no. Suggesting those is just sending the poster in the wrong direction. GLUT and GLUI aren't substitutes for real UI interface libraries at all. GLUT certainly provides some useful functions for basic things like setting up the rendering surface and putting a text string onto the screen, but it's not a UI library. GLUI is, but it's a simple, crude little thing for people who need their graphics demos to be a little bit interactive. You couldn't remotely approximate something like an office suite with it.

    20. Re:Obvious choice is OpenGL by Anonymous Coward · · Score: 0

      QButton ok = new QButton("OK");

      Now change it's color. Make it transparent. Animate it around the screen. Change its shape. Rotate it.

    21. 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?

    22. Re:Obvious choice is OpenGL by Anonymous Coward · · Score: 0

      I would only really recommend OpenGL for things that already use it, mostly games. OpenGL isn't at all made for integrating in with normal window manager widgets and usage patterns, like Qt or wxWidgets and other toolkits are.

    23. Re:Obvious choice is OpenGL by Anonymous Coward · · Score: 0

      It's an ok button ffs, you're a douchebag if you think you're winning based on your retarded line of reasoning

    24. Re:Obvious choice is OpenGL by euroq · · Score: 1

      Not only do I know that 2D is a plane in 3D space, I've actually had to use it before. On Android, I made a game with 3D graphics with a 2D HUD.

      2D operations are not retardedly easy in OpenGL. Look at the code below. There are no canvas.drawCircle, canvas.drawLine, etc. functions like there are in other frameworks such as AWT. Nor is the OpenGL compatible with every platform, as my experience has shown me with Android. Hell, it wasn't even compatible with every Android phone.

      OpenGL is not what the OP (original poster) asked for.

      --
      Just because the U.S. is a republic does not mean it is not a democracy. Democracy/republic are not mutually exclusive.
    25. 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.
    26. Re:Obvious choice is OpenGL by The+End+Of+Days · · Score: 1

      Do you care about that, though? It's not like a button that animates around the screen and rotates has many use cases.

  5. 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.

    1. Re:How many FPS are you looking for? by Anonymous Coward · · Score: 1, Interesting

      Easy, Good, Portable.

      Pick two.

      But seriously, WPF can now provide more than enough horsepower for some really flashy UIs - at the cost of portability.

    2. Re:How many FPS are you looking for? by Blakey+Rat · · Score: 1

      But seriously, WPF can now provide more than enough horsepower for some really flashy UIs - at the cost of portability.

      Silverlight applications are portable, so you *kind* of get portability. But this guy only says the final application needs to run in Windows, so yeah... WPF is fine.

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

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

    1. Re:.NET Windows Forms by davepermen · · Score: 1

      WinForms + 1. Very simple, low level enough to understand certain decitions, but definitely high level enough to be very fast at getting done what was planned. from tiny apps to quite big apps, it works great. And lots of extensions from others (want an office 2010 style ribbon? sure available for winforms from somewhere). WPF has a much steeper learning curve for questionable benefit.

    2. Re:.NET Windows Forms by Anonymous Coward · · Score: 0

      Even easier than Windows Form and much more expensive for future projects is Delphi. I program both and WInForm is a little behind the curve.

    3. Re:.NET Windows Forms by Robert+Zenz · · Score: 0

      I haven't looked the WinForms in 4.0, but up to 3.5 it's a pain in the a**. The controls are limited in any way you can imagine, the text of labels is not selectable, the backgroundcolor of some controls (f.e. TabControl) are not exposed so you have to draw it yourself, only horizontal progress bars and so on and on and on...

      Seriously, WinForms is a nice and easy to use Widget-Library...but the moment you wanna do something 'fancy' you should get as fast and far away from it (and .NET) as you can.

    4. Re:.NET Windows Forms by Xest · · Score: 1

      This is just silly, any control library can't do things that it doesn't implement by default by the very definition of that concept.

      It's not like it's hard to extend Windows forms to do the things you want if you want to do things out of the ordinary, if you want selectable labels stick a textbox on, borderstyle none, backcolor control and readonly true. Not exactly difficult.

      Windows forms provide all you need to implement a standard Windows user interface though, things like coloured tabs, vertical progress bars, selectable labels aren't standard Windows user interface components so break the rules of good user interface design in ensuring a UI is familiar. Why would Microsoft implement things in their basic Windows forms library that go against standard UI components that the end user is used to? It's not like they prevent you implementing that if you really want to.

      It sounds more like you're just not very experienced in UI design and Windows Forms.

    5. Re:.NET Windows Forms by digitalunity · · Score: 1

      It sounds like you don't know any better lol.

      Winforms has a nice API, but there are a lot of drawbacks to it. Essentially it is a wrapper for WIN32 GDI and that brings in a lot of limitations. Microsoft made a poor decision in choosing to not reimplement controls in Winforms because they would have very quickly been able to add a lot of flexibility and features that are missing from other frameworks like Qt.

      --
      You can't legislate goodness. Let each to his own destiny, by will of his freely made choices.
    6. Re:.NET Windows Forms by Xest · · Score: 1

      Like what? You still have the freedom to do anything you need, it's not like you're limited as to what you can paint.

      It's not as rich as say, WPF, but that's because it's not designed to be, it was always designed to be a base forms library, and as long as you can paint what you want and handle pretty much any event you need to in a custom control, which you can, then there's really no limit.

      WPF is Microsoft's updated implementation for UI work, but it's far more complex, and far less lightweight. What limitations are you suggesting exist for WinForms? what sort of control that's standard to a Windows application UI do you seem to believe can't be created with it because of these limitations?

  7. properly abstract your UI and it won't matter by gblues · · Score: 1

    Design your application to modularize the OS-dependent code away from the OS-independent code. When it comes time to port (if it ever happens) you should only have to worry about the OS-dependent stuff with minimal modification to the core of the application.

    1. Re:properly abstract your UI and it won't matter by Anonymous Coward · · Score: 0

      Nicely abstracted UIs make programmers happy. Awesome user experiences make customers happy. In the end, customers matter. Programmers don't.

    2. Re:properly abstract your UI and it won't matter by abdulla · · Score: 1

      The real problem with that is some of the platform dependencies won't be clearly visible until you've ported the code to other platforms. You may have designed something that works very well with one platform, but is insupportable on another. I believe there is something akin to "the rule of 3", where you only know if something is truly portable if you have successfully ported it to at least 3 different platforms.

    3. 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.

    4. Re:properly abstract your UI and it won't matter by euroq · · Score: 1

      You have a great point, you really do. But the original poster mentioned that it was for personal use, so the programmer IS the customer.

      --
      Just because the U.S. is a republic does not mean it is not a democracy. Democracy/republic are not mutually exclusive.
    5. Re:properly abstract your UI and it won't matter by mabinogi · · Score: 1

      Good luck getting to that end without a programmer though.

      --
      Advanced users are users too!
    6. Re:properly abstract your UI and it won't matter by putaro · · Score: 1

      If you make a general purpose wrapper layer, yes, you'll end up with a mess. A different way to do is to decompose your GUI along MVC (Model View Controller) lines and make different View layers for the different OS's/toolkits. Rather than making a general purpose wrapper you have a single purpose wrapper. I've done this and it works quite well.

    7. Re:properly abstract your UI and it won't matter by Bozzio · · Score: 1

      well, that really depends on the project. If this is a one-shot demo why waste time doing that?

      --
      I just pooped your party.
    8. Re:properly abstract your UI and it won't matter by maxwell+demon · · Score: 1

      So you claim that a nicely abstracted UI (which is an implementation technique) is incompatible with an awesome user experience (which mainly depends on the UI design)?

      --
      The Tao of math: The numbers you can count are not the real numbers.
    9. 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.

    10. Re:properly abstract your UI and it won't matter by Anonymous Coward · · Score: 0

      Happy programmers lowers the costs. Happy customers rises the sell value. In the end, the balance matters. Whether you safe x in costs or get x more in income doesn't.

    11. Re:properly abstract your UI and it won't matter by oiron · · Score: 1

      Nicely abstracted UIs make it easier to design for awesome user experience. In the end, anyone who doesn't understand that doesn't matter.

  8. Adobe Flex? by Anonymous Coward · · Score: 0

    If you aren't a Flash-hater:

    The IDE isn't free...but the SDK (including all the GUI widgets) is, under MPL. While the traditional usage is browser-based (iFoos excluded), Flex can also produce Windows/Mac/Linux executables that run top of on their AIR run-time (similar to .NET or Java's) :

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

    A quick tour of what's possible: http://www.adobe.com/devnet-apps/flex/tourdeflex/web/

  9. 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 Anonymous Coward · · Score: 0

      Read the subject line....They say GUI

    2. Re:More information by Qzukk · · Score: 1

      No, he says he wants to use "a canvas to paint custom objects". No word at all if these "objects" are even supposed to be interactive. Maybe he just wants to draw a flowchart using squares, ovals, diamonds, and arrows. Or maybe he wants to make a slide show. Who knows?

      --
      If I have been able to see further than others, it is because I bought a pair of binoculars.
    3. Re:More information by Hognoxious · · Score: 1

      Read the subject line....They say GUI

      GUI is a pretty broad thing. It could apply to anything from old style "forms & panels" to a real time strategy game with multitouch and the like.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    4. 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.

    5. Re:More information by eabrek · · Score: 1

      I've started playing with something like this (Magic clone). I use Tcl/Tk (pure Tcl at this point, with a plan to add some functionality in C++). The cards are 'canvas' objects, and the playing area is a canvas (you can embed a canvas in a canvas). Cards are bitmaps, with text (canvas supports both, plus drawing functions). The hardest part was getting the drag and drop right.

      I even have network functionality done.

  10. flash by martas · · Score: 0

    Don't have much experience with GUI, but if you need to draw stuff, I found Flash+ActionScript to be pretty easy to jump into, w/o much tutorialling (though this was 7-8 years ago, no idea what's going on with it now; don't even know if there's a free version for non-commercial users of flash).

  11. 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 Anonymous Coward · · Score: 0

      I would suggest Qt over those two, for the same reasons. Java runs piss poor performance for any client app I've ever made or used, OpenGL isn't a gui framework. However, the only popular platforms Qt doesn't run on is IPhone and IPad, it does run on Apple PCs though.

      I had same question a while ago and went with Qt and made custom widgets no problem. The licensing has also changed recently to make it a little more developer friendly, no difference if its just for personal use.

    2. Re:AWT or OpenGL by euroq · · Score: 1

      I've used AWT, OpenGL, and .NET, and others I suppose. If I were doing it myself, personally I would do Java, because I'm very familiar with it. It has loads of examples out there, but it does have its little caveats that you will get hung up on while you are starting out. OpenGL has a steep learning curve and it's hard to get simple things done. Honestly, of those three I mention, .NET has the quickest learning curve, and is slightly faster at getting things done quicker than AWT.

      --
      Just because the U.S. is a republic does not mean it is not a democracy. Democracy/republic are not mutually exclusive.
    3. 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.

    4. Re:AWT or OpenGL by Anonymous Coward · · Score: 0

      Forget AWT use SWT(Eclipse) or Swing. AWT suffers from the fact that:
      A) It's Ugly (note the capital) as sin
      B) It is directly tied to OS objects for painting

      Swing is a layer over AWT that does exactly what OP wants: Uses a 'canvas' to paint custom components. In particular look at the implementation of JTable. It uses secondary Renderers and Editors to paint each cell of a spreadsheet-like container.

    5. Re:AWT or OpenGL by Anonymous Coward · · Score: 0

      lol

    6. Re:AWT or OpenGL by hotfireball · · Score: 1

      Java runs piss poor performance

      Not at all. The only poor performance if you want to do such animations as in iOS. If you need that crap, of course...

    7. Re:AWT or OpenGL by m50d · · Score: 1

      WTF? AWT exists for only one platform - Java - and hardly anyone's using it there.

      --
      I am trolling
    8. Re:AWT or OpenGL by pinkeen · · Score: 0, Troll

      Could somebody explain this to me - if java is so fast and its gui frameworks are so good how come that every bigger application based on this technology feels sluggish and often is simply slow as molasses. Imagine that you write a line of code and it appears on the screen 500-1000ms later (yes, I am talking about a well-known java-based IDE).

    9. Re:AWT or OpenGL by Anonymous Coward · · Score: 1, Insightful

      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.

      I haven't used any of those other toolkits you mention, but compared to Tk, Swing's API is just horrible. Maybe there are some third-party layout managers that don't suck? Because all the built-in ones certainly do.

      Part of the problem is Java itself, of course. For example, the lack of lambdas makes the listener pattern extremely verbose, and it looks like the lambdas that are supposedly coming in Java 8 won't actually help because they only work for single-method listeners, and most of Swing's have several methods.

      Java2D [...] automatically gets hardware acceleration (OpenGL on *NIX systems) so the performance is good

      Ha ha ha! That was a very funny joke, sir. I congratulate you.

      Hardware acceleration of Java2D is great on Windows, where it uses DirectX. On Unix it rarely even works, and is AFAIK still disabled by default. It is completely broken on Solaris, and pretty unreliable on Linux in my experience.

      And raw drawing in Java also has a poorly designed API. For example, why the hell does java.awt.Graphics.drawRectangle() not accept a java.awt.Rectangle as a parameter?

      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.

    10. 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.

    11. Re:AWT or OpenGL by peppepz · · Score: 1
      I've done some benchmarks comparing Java with equivalently coded native code. For the kinds of code I need, Java code runs almost as fast as native code: slower in number crunching, faster in high level code (e.g. string handling, memory allocation).

      Java UIs appear slow not so much because of their speed, but because of their responsiveness, which may be hindered by the pauses induced by garbage collection. Work is being done to address that. They also require more memory than native UIs.

  12. 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/
  13. SFML by Galik · · Score: 1

    You might want to look at SFML, its cross platform and 2D oriented and works with a number of window toolkits: http://www.sfml-dev.org/

  14. opengl by junglebeast · · Score: 1

    I would recommend OpenGL because its flexible, efficient, and cross platform. DirectX is a lot easier to use for 3D graphics but for simple 2D stuff I wouldn't mind using OpenGL and it's worth it for the benefit of being cross platform.

  15. QT is getting much better by Anonymous Coward · · Score: 1, Informative

    QT 4+ has been pretty decent. It has bindings for most languages and is really nice to work with.

  16. 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 bertok · · Score: 0

      Out of everything I've tried (pretty much everything usable from C, C++, and C#), WPF is the best UI framework around. ...

      WPF is the GUI framework that is "almost good enough" for whatever it is you want to do. It doesn't really matter what you're trying to do, it almost, but doesn't quite, do it right.

      For example, data virtualization: it allows controls to display "millions" of records without slowdown. The GUI elements are virtualized, but the data is not. So the stupid control will read in 999,000 rows of data from the database to display the last 100 rows of it. Brilliant. There is NO WORKAROUND. None. Write your own damned data grid control if you don't want it to melt your database server into a pool of slag. Not surprisingly, there's a roaring trade in third-party controls written by developers that didn't eat their crayons in school.

      I love how it has a print dialog which does not allow users to select what pages they want to print. I spent weeks trying to figure this one out until I realized that it's just broken, and the best thing to do is call the old version of the print dialog.

      Don't believe me? Are you running Vista or Windows 7? Open notepad, paste in some text, and hit print. Now try to print anything other than "All pages". Can't, can you? That's Microsoft quality, right there.

    3. Re:WPF, Qt, or Python by Anonymous Coward · · Score: 0

      O fer fucks sake, none of MS's controls for WinForms or WebForms do this either, and they shouldn't because this functionality doesn't belong in a UI element. Do it in the fucking data source that you bind to the UI control, where it fucking belongs.

    4. 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
    5. Re:WPF, Qt, or Python by bondsbw · · Score: 1

      Open notepad, paste in some text, and hit print. Now try to print anything other than "All pages". Can't, can you?

      You're joking, right? The Windows 7 print dialog looks like this. Isn't that a page range selection box in the bottom left?

      The GUI elements are virtualized, but the data is not. . . . There is NO WORKAROUND. None.

      Wrong again. There are sensible workarounds involving lazy loading, like this. No new data grid necessary. That said, this needs to be in the framework, and it sounds like they will be addressing this soon.

      Now, I complain nearly everyday about all the quirks in WPF/XAML. I hate spending an hour writing XAML code, compiling regularly, and finding out at runtime that the basis of my strategy is flawed because of something that could have been checked in the compiler, but was not. But I can't deny the flexibility and ease that WPF lends to nice UI design. The XAML language needs a makeover, but WPF itself is second to none.

      --
      All my liberal friends think I'm a conservative, all my conservative friends think I'm a liberal.
    6. Re:WPF, Qt, or Python by Anonymous Coward · · Score: 0

      I think that WPF is for experts and not for causal programmers or people who want to write serious software in a finite amount of time. If you want cross-platform. Other than VS 2010, what major software apps have been written using WPF? I would pick Qt first then Java. If you're only going to write for Windows then I would pick Delphi first, then Qt, then maybe WinForms. The only issue with Winforms is that its future is uncertain and the widget set is very limited unless you're willing to purchase commercial offering. There is virtually no freeware Winforms community (Compare this to Delphi which as a very active widget community).

    7. 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."

    8. Re:WPF, Qt, or Python by bertok · · Score: 0

      Open notepad, paste in some text, and hit print. Now try to print anything other than "All pages". Can't, can you?

      You're joking, right? The Windows 7 print dialog looks like this. Isn't that a page range selection box in the bottom left?

      Did you not notice how the "current page" option is disabled? It's permanently disabled, and cannot be enabled via the WPF API.

      The GUI elements are virtualized, but the data is not. . . . There is NO WORKAROUND. None.

      Wrong again. There are sensible workarounds involving lazy loading, like this. No new data grid necessary. That said, this needs to be in the framework, and it sounds like they will be addressing this soon.

      Now, I complain nearly everyday about all the quirks in WPF/XAML. I hate spending an hour writing XAML code, compiling regularly, and finding out at runtime that the basis of my strategy is flawed because of something that could have been checked in the compiler, but was not. But I can't deny the flexibility and ease that WPF lends to nice UI design. The XAML language needs a makeover, but WPF itself is second to none.

      The workaround that doesn't involve writing huge amounts of code yourself is a mere 109 KB of source code involving substantial multi-threading and knowledge of the WPF data binding internals, most of which is undocumented. I'll just roll my sleeves up and do that right away.

      Not counting third-party commercial control suites, this is the first such solution I've seen that even remotely has a hope of working. I've seen several before that claimed to virtualize the data but enumerated everything anyway. Either way, using this code will disable smooth scrolling, so significant functionality is lost. I tried turning it back on, but even with a 50 ms data loading delay, the result is unusable.

      Also, notice that this is a post from April 2010. WPF has been out since Nov 2006, so it's taken over 3 years for a free-to-use solution to appear for what is a critical performance design flaw.

      From what I've heard, most of the changes in WPF 4 were prompted by Microsoft's attempt to use it for Visual Studio 2010, the GUI of which was unusable while it was still using the 3.5-era WPF framework.

      It's still broken, and at the rate Microsoft is going, it won't be fixed until WPF 6 or 7, by which time they'll get bored of it and invent something new and shiny and broken.

    9. Re:WPF, Qt, or Python by sznupi · · Score: 1

      Or you can just provide Qt?... (aren't the UIs too far apart to be not scary to any user anyway / do you have something which demonstrates how does it work in practice?)

      --
      One that hath name thou can not otter
    10. Re:WPF, Qt, or Python by forkazoo · · Score: 1

      The fun of a python script is that it can potentially run on a lot more platforms than you will ever bother to provide Qt for. I can execute the exact same file on my phone and my windows box. Going dual-GUI with a layer of abstraction between your code and the UI means that it can run pretty much anywhere, but where Qt is available to python, it won't look like ass. (Hey, I'm not saying tk isn't useful, but it doesn't exactly look right at home on any platform popular in the last decade.)

    11. Re:WPF, Qt, or Python by sznupi · · Score: 1

      Hm, with Qt (at least when it comes to widespread phones with decent Python support) - basically the same thing working on the phone and windows box can also be the case ;p

      Oh well, might still try it sometimes - while tk doesn't look right at home, apps using it do not feel bad to me at all; and if it's supposedly all-around nicely engineered...

      --
      One that hath name thou can not otter
  17. 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 forkazoo · · Score: 1

      To be fair, I'm not sure how strictly that provision is actually enforced. If you actually show up with a pile of cash and try to sweet talk your salesman, I'm pretty sure he'll do just about anything to take some of your cash. Besides, there are relatively few cases where you would really need something other than LGPL. Under LGPL, you can charge for your software, keep your application source closed, and even make extensive changes to Qt itself. The only thing you would need to do is make changes to Qt available as source. There are certainly some cases where GPL doesn't meet the needs of a particular project, but for a typical application developer, it's more than good enough. (And, while Qt may not work for a specific project, IMHO it's still well worth learning because there are so many projects where it can be a very useful tool.)

    6. Re:Qt by Kjella · · Score: 1

      This was a lot more true when Qt was GPL, but being LGPL you can write and sell closed source applications with it as long as you contribute back any improvements you make to the library. Other people will not be able to give away copies of your software because the GPL only gives them distribution rights to the library, not the whole thing as with the GPL. Very few projects should need the commercial license anymore, and if you do because of some anal platform requirements like iOS or consoles then Qt doesn't support those platforms anyway. If all you want is Win/Mac/Linux then I don't see any reason to not use Qt.

      --
      Live today, because you never know what tomorrow brings
    7. Re:Qt by Anonymous Coward · · Score: 0

      Yeah technically they still have that restriction. But realistically you can do whatever you want. No one is going to come after you. They'll be happy if you eventually buy a license, not launch an investigation.

      Sure .NET/Winforms/WPF is fine if you're only ever going to target Windows platforms. But you never know when the requirements might change. I had a Windows only app I was licensing for years, and suddenly the contractor had a big mac push and needed it to run on Mac. With Qt I was able to "port" to mac in a couple days and have a native looking app on both platforms with almost no work. With Microsoft technologies you're either looking at a rewrite of the UI or something that looks out of place.

    8. 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.
    9. Re:Qt by Anonymous Coward · · Score: 0

      On the other hand I had much frustration with some Qt datatypes, because they lacked constructors or methods I never thought someone would skip or implement a method in that manner. Yes, you can extend the class, but some decisions were annoying.

      For example being able to get (unix) seconds from a time type, but not the other way around. It only took 0-60 (60 for the rare leap second) and only changed the seconds like you would see in a formatted view. It is nice to have such for some input widgets, but to omit the other seemed stupid.

      Also not being able to put abstract widget classes in a QList was quite annoying, but I blame c++ for that. Really annoying if you have two widget types you need in one list (Working with QGraphicsScene to draw on a canvas). Might have changed, but I missed that oo feature from java.

    10. Re:Qt by dwater · · Score: 1

      it might be worth looking into using QtQuick since it has many advantages for UI designing.

      --
      Max.
    11. 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

    12. 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.

    13. Re:Qt by QuantumG · · Score: 1

      Sigh. That section doesn't apply because *you can't do that with C++* which is what Qt is written in. Maybe if the Qt coders bothered to do proper exporting of classes (export an "extern C" constructor function and make all methods virtual) then you could kinda make the argument that you've included nothing from the source library.. but they don't do that. Anything defined in the header file will be included in the calling binary.. replacing the dll won't work, which is why the LGPL requires you to give permission to reverse engineer and modify the calling binary if necessary.

      --
      How we know is more important than what we know.
    14. Re:Qt by JohnFluxx · · Score: 1

      Does .net let you modify the libraries and then redistribute the binaries without making the changes public? Is that something you need?

      I don't follow why this is a must-have feature for you.

    15. 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.

    16. Re:Qt by Uzik2 · · Score: 1

      I can second this recommendation. If you're not going windows only look at Qt.

      --
      -- Programming with boost is like building a house with lego. It's a cool but I wouldn't want to live in it
    17. Re:Qt by Anonymous Coward · · Score: 0

      What is wrong with QDateTime::fromTime_t(x);

    18. Re:Qt by fishbowl · · Score: 1

      "Yeah technically they still have that restriction. But realistically you can do whatever you want. No one is going to come after you. They'll be happy if you eventually buy a license, not launch an investigation."

      If the OP is the type who needs that assurance in writing, he hasn't gotten anywhere after this thread.

      --
      -fb Everything not expressly forbidden is now mandatory.
    19. Re:Qt by Anonymous Coward · · Score: 0

      Qt does not support the LGPLv3 license.

    20. Re:Qt by QuantumG · · Score: 1

      http://qt.nokia.com/products/licensing

      Option 3.. gee, that was hard to find..

      --
      How we know is more important than what we know.
    21. Re:Qt by QuantumG · · Score: 1

      Oh, LGPL, never mind.

      --
      How we know is more important than what we know.
    22. Re:Qt by Twinbee · · Score: 1

      Hi, I'm the OP.

      I'm a little happier now that you've clarified that (good links). Though there are still a couple of small question marks in my mind (and the impossibility of upgrading still bugs me to death, but never mind).

      For example, there was the point further down in that thread. I'll just quote an edited version here, and maybe you or someone else can help:

      "* The vendor also needs to provide access to Qt libraries to the end-user (customer), and the vendor is obliged to give the end-user (customer) the tools to modify them, and re-load them into the device."

      When it says provide access, does it mean so that I would leave the Qt DLLs intact? Obviously, I would provide them because my own software has to use them. So maybe I misunderstand that point.

      Also, when it says I would be obliged to give the end-user (customer) the tools to modify them, can someone clarify what that means? I think the files in question are DLLs. Does it just mean that they can replace the DLLs with updated versions?

      --
      Why OpalCalc is the best Windows calc
    23. Re:Qt by ByteSlicer · · Score: 1
      Hi.

      The relevant parts of the LGPL v2.1 are:

      4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.

      and

      6. [...] For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.

      Basically, you have to provide to everyone that you distribute your binaries to (directly or via third party) and that ask for it, the sources and make scripts needed to compile the QT libraries. In practice you can just download a copy of the QT sources and either put that on your distribution medium or offer it for download on your site next to your binaries. The safest thing is probably to bundle everything (your executables, the QT binaries and QT sources) in one installer. In that case, nobody can bother you about the sources afterwards

      Also acceptable is to provide a direct link to the Nokia download site, but you will have to download and keep a copy for yourself, so you can provide the sources yourself if the original provider disappears.

      Regards.

    24. Re:Qt by Twinbee · · Score: 1

      Yes, I would rather provide a link to my own site for the user to download the QT sources, or even better, like you say, directly to the Nokia QT download site.

      I imagine including the QT source with my program will bloat the distribution by several megs otherwise, so I'd rather just include the binaries/DLLs.

      Hopefully, the LGPL will be compatible with a GPL license should I need to include another library that uses that kind of license with my software as well.

      --
      Why OpalCalc is the best Windows calc
    25. Re:Qt by ByteSlicer · · Score: 1

      Another possibility would be to only distribute your binaries and provide a download link to the QT binary libs on the Nokia site. That way Nokia remains the distributor and you will not have to provide any source code. To be safe you should still attribute Nokia by putting a notice in your software (e.g. About popup) that you're using the QT libs version X (c) Nokia under the LGPL 2.1 license .

      The LGPL v2.1 license explicitly allows you to also use the code under the GPL v2 license instead. In that case you will have to distribute your binaries with all sources (including your own, but you may dual-license with some commercial license if you wish) under the GPL v2 or compatible license. Note that the GPL v2 is not compatible with the GPL v3 license unless the license headers state that you can use the sources under the GPL v2 or a later version

      It is worth noting that QT is multi-licensed: LGPL v2.1, or GPL v3 with a special exception (allowing you to include it in certain non-GPL compatible open source code, e.g. licenced MPL), or commercial (then you have to pay, but you can use it practically as you please). See here.

    26. Re:Qt by Twinbee · · Score: 1

      Thanks muchly for the informative replies. Hopefully then I can avoid the GPL restrictions by just using LGPL where possible (dual license is possible if the particular vendor supports it I guess though).

      --
      Why OpalCalc is the best Windows calc
  18. .NET by TexVex · · Score: 1

    I'm personally a fan of .NET, mainly because the toolset goes a long way towards making development easy. Consider: You start the Visual Studio C# IDE, create a new Windows Forms application, then use a simple menu selection to create a new User Control class. You are given a canvas and can immediately begin adding existing controls to it, and if you want to custom-draw the whole thing then you just use the Events tab of the Properties window to create a handler for the Paint event. The paint event handler's args give you access to the control's canvas, and you're off and running. The IDE adds your custom control to the Toolbox, so you can just drag it onto a form to create an instance, and a good portion of it functions in design mode so you can check it out before you ever actually run your project.

    It doesn't get any easier, I think.

    I've begun learning Mono. I don't know enough about the differences between MONO and .NET, and Visual Studio and MonoDevelop, to speak to how easy or difficult it really is to do Windows/Linux cross-platform development with it. Yet.

    --
    Fun with Anagarams! LADS HOST, SHALT DOS. HAS DOLTS. AD SLOTHS, HATS SOLD. ASS HO, LTD.
    1. Re:.NET by wasabii · · Score: 1

      ".Net" isn't a UI platform. You probably mean WinForms. Or maybe WPF. There are other UI frameworks for .Net, I used to do a lot of work in Gtk#, before I switched to WPF.

      I've never used WInforms for anything serious though. Gtk# was always better than it, back then.

  19. 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!

  20. 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: 1

      I agree. WPF's design is quite unlike any other UI toolkit I'm aware of. I wish there was a version that worked on !Windows.

    2. 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.

    3. Re:WPF by JohnFluxx · · Score: 1

      Qt has its own thing like WPF, called QML.

      Youtube tutorial: http://www.youtube.com/watch?v=TN4RrBIft6A&feature=related

    4. Re:WPF by gmurray · · Score: 1

      I would have to second that WPF is fantastic. It uses a lot of new paradigms so it can be tough to get into if all you've used is qt or winforms, but its totally worth it. Its also very easy to separate View logic from Presentation logic in WPF, so much so that new UI patterns are emerging all the time to take advantage of WPFs unique features and further decouple your view logic.

      Also, vector graphics and animation were part of the core design of WPF (rather than tacked on later). So the whole thing works very naturally for creating very compelling UI with not a lot of work invested. Also, when you are learning WPF you are also learning Silverlight in the process, as Silverlight is merely a subset of WPF.

      To those wondering why Mono doesn't seem too concerned about WPF, it may be because they intend to use MoonLight (Silverlight port) for a 2D UI framework on the Linux platform. This is just theory as I haven't kept up to date with their roadmap there. Also, you could probably add Silverlight to your list of 2D frameworks there. You can create out of browser apps with it, and its the 2D framework that Windows Phone 7 uses.

    5. Re:WPF by Anonymous Coward · · Score: 0

      It certainly does set WPF apart - it's horribly slow and you never really trust the code you've written.

    6. Re:WPF by Anonymous Coward · · Score: 0

      plus it takes half a minute to load up the first wpf dialog in your app. talk about performance!

    7. Re:WPF by NuShrike · · Score: 1

      It sounds like they took WTL and ran with it. I'm impressed.

  21. All the things you mentioned are primitive by Anonymous Coward · · Score: 0

    even opengl :)
    you could build something on top of them, but its a lot of wasted effort

    You want to use
    http://www.tkzinc.org/
    http://www.wxart2d.org/
    http://www.box2d.org/
    or the like

    1. Re:All the things you mentioned are primitive by SQLGuru · · Score: 1

      SDL is easy and is supported by a wide variety of languages. Works on both Linux and Windows (per the original post). Seems like a good fit.
      http://www.libsdl.org/

  22. A canvas to paint custom objects? by Korbeau · · Score: 1

    I was about to reply some pros&cons and that in the end all frameworks have their limits and how if you try something else than asking for a birthdate in a textbox and outputing the age in another when the user hits a button you'll spend hours and hours tweaking little details (why won't it let me put an icon here! Why won't it align correctly!)

    But I re-read you question and you talk about re-writing all the GUI yourself, so I don't really understand why you need a UI toolkit to start with. But you probably have not phrased your needs completely.

    Anyway, the obvious answer is to try WPF for Windows if your app is for Windows.

  23. Pythons UI stuff? There is no Pythons UI stuff by Anonymous Coward · · Score: 0

    Python is a language with bindings to various gui toolkits like Qt/wxWidgets/Gtk2/Tk ... even WPF with IronPython. It doesn't have UI stuff of its own. You know nothing.

    1. Re:Pythons UI stuff? There is no Pythons UI stuff by Your.Master · · Score: 1

      I would assume he's talking about Tk via Tkinter.

    2. Re:Pythons UI stuff? There is no Pythons UI stuff by Anonymous Coward · · Score: 0

      It comes with Tkinter bundled, even though it's written in Tk. It's part of the batteries that are included.

  24. 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
    1. Re:More info needed by BitZtream · · Score: 1

      I should add to the .NET part of my post that I suggest that as then you'll be able to use basically whatever language you want to use and still have access to all the goodies. I would use C# myself, but you can of course use C++, VB.NET, and tons of other languages on Windows (Not sure if Mono does VB and I'm too lazy to look :)

      You can also change languages a lot easier later, say if you find out C# isn't going to cut it for you performance wise you can move to C++ in .NET initially and if that doesn't give you the speed up you need you'll have most of your code closer to being able to run outside the .NET runtime as well.

      You can also wrap just about any existing C++ library in a minimal amount of code to get something you can use in .NET. I've got TONs of OLD C code that I use in .NET via simple C++.NET wrappers that I wrote by hand ... but I probably could have scripted (Hell, SWIG probably would do it for me)

      All of this is based on the idea that its entirely for personal use. If you want others to help you work on it, well then you're going to want to pick langauges and runtimes that people like to use. You're not likely to see a BUNCH of support from the Linux crowd for .NET runtime environments (CLI/CLR)

      --
      Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
    2. Re:More info needed by narcc · · Score: 1

      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 :/

      This is at once both refreshingly honest and very wise. The world could use more developers like you.

  25. 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.

    1. Re:He's looking for drawing, not a toolkit! by M.+Baranczak · · Score: 1

      Actually, we have no idea what he's looking for (and I don't think he does either). "Paint custom objects"? That could mean just about anything.

    2. Re:He's looking for drawing, not a toolkit! by tibit · · Score: 1

      A canvas, to be useful, needs a whole lot of supporting code. If you go the whole nine yards, you end up with an application development toolkit like Qt. Suppose you have some text that needs editing on the canvas. Do you really want to implement text editing GUI yourself? While this may be simple for a fixed width font, things get tricky with kerning and multiple formattings, and you start getting sidetracked a lot when your right-to-left locale customers complain that nothing works.

      Qt's QGraphicsView is the canvas widget you're looking for; your items would derive from
      QGraphicsItem. About the only shortcoming of that subsystem is that there's no built-in support for interaction-independent views of the same scene. You can have multiple views of the same scene, but all they differ with is the viewport transformation. Thus you can't have, for example, different objects selected in different views of (windows into) the same scene, and you can't edit something in one view, stop, edit something else in another view, then come back to the first view -- both selection and focus is per-scene, not per-view like needed in such scenario.

      I don't know offhand of any generic 2D canvas system that would come anywhere close to implementing a per-view interaction context -- the latter consisting at least of the selection, focus, and user-interaction elements (such as handles, pop-up menus, whatnot). Qt's canvas is perhaps the most feature-laden canvas of them all anyway, in spite of the above limitation.

      --
      A successful API design takes a mixture of software design and pedagogy.
    3. Re:He's looking for drawing, not a toolkit! by mysidia · · Score: 1

      If he wants a canvas framework, it sounds like he is looking for the SDL library or other multimedia game engine library, so he can build his custom GUI system.

    4. Re:He's looking for drawing, not a toolkit! by Kjella · · Score: 1

      Well, if all he wants is to draw that is easy - at least in Qt it doesn't take a canvas just a widget and a QPainter. Since he's asking for canvas functionality I figure he'll want to actually use them interactively, which does bring you over to "if I click on x, how do I trigger y to happen" which is deep into toolkit land keeping track of items and their properties and programming model. And for that, I'd recommend Qt...

      --
      Live today, because you never know what tomorrow brings
    5. Re:He's looking for drawing, not a toolkit! by Anonymous Coward · · Score: 0

      If he is going the OpenGL route, it may be worth having a look at Blender, and see if some of it's drawing code can be re-used.
      Most of the low-level OpenGL interface was re-written for Blender 2.5, and should now do proper double or triple buffering, for flicker-free drawing.

    6. Re:He's looking for drawing, not a toolkit! by JohnFluxx · · Score: 1

      Qt lets you do stuff like take a button, style is with CSS to make it look how you want, then put it in an opengl scene. The result is a button that that looks however you want in opengl, but has all the behaviour of a button.

      You can CSS-style all the widgets in Qt.

    7. Re:He's looking for drawing, not a toolkit! by owlstead · · Score: 1

      Actually, we have no idea what he's looking for (and I don't think he does either). "Paint custom objects"? That could mean just about anything.

      Yeah, we could propose eggs and paint, and not know if it fills the requirement.

    8. Re:He's looking for drawing, not a toolkit! by rhendershot · · Score: 1

      and the platform choice is similarly unfocused; Windows is required with linux optional... but preferred. I would take that to be a practitioner's choice not a user or client perspective.

    9. Re:He's looking for drawing, not a toolkit! by Blakey+Rat · · Score: 1

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

      I read the entire summary and I have no fucking clue what he's looking for. You may be right, but then again, maybe the people talking about UI frameworks are right, too.

      For "painting custom objects" I recommend a nice flat white latex, but make sure you put a coating or two of base primer first otherwise your paint may flake in a couple years. There, see? I just answered the question.

    10. Re:He's looking for drawing, not a toolkit! by BitZtream · · Score: 1

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

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

      Which is not going to be useful at all if it doesnt' fit into the toolkit he's using, so ignore the toolkit is something an inexperienced developer would do.

      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.

      Hence ... why ... people ... are ... suggesting ... toolkits.

      You talk in circles like someone who has absolutely no experience doing what he asked. Perhaps the suggestions people are giving have something to do with their level of experience and knowing that you're going to want a canvas control that works with a toolkit in order for it to actually be useful unless you intend to reinvent the wheel, which is clearly out of his league as he wouldn't have needed to ask slashdot if he was capable of doing so.

      Your post wasn't insightful, it was ignorant and wreaks of someone who has never done anything like the questions that were raised.

      --
      Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
  26. 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 gandhi_2 · · Score: 1

      Thanks to you for the tip on pyside. I was looking around at this stuff and didn't know where to start.

      This really IS pretty cool.

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

      There is at least some attempt to make C# bindings for Qt, and IIRC there are java bindings too.

      --
      I am trolling
    3. 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

    4. 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".
    5. Re:I second this, OpenGL and QT are both great. by Anonymous Coward · · Score: 0

      And Qyoto for Mono.

  27. more info needed by Tumbleweed · · Score: 1

    I am looking to build a 2D application for personal use and I will need to use a canvas to paint custom objects.

    Not enough info, really, but I'm wondering if you've considered making this a web app; then it would be compatible with anything with a modern browser.

  28. Java SWT is... okay~ by doublebackslash · · Score: 1

    I've done a lot of programing but not a lot of UI work outside of the browser (where most of my user interaction has been). However, I've found that the JAVA SWT to be "okay" for desktop GUI apps. Sure, it isn't as flexible as opengl or javascript/html(xml)/css, but it gets the job done for your standard inputs and outputs. If you want to do something fancier than the most basic 2d graphics (or minecraft-like 3d) you won't like it and neither will your users.

    Mostly what you should ask yourself is "Can a browser do this?" and if the answer is no (sounds like it is) then ask, "Do I need anything fancy?" Those two questions will drive your decision.

    Good luck. Dealing with the GUI is an order of magnitude more fiddly than all the algorithms work you will ever encounter. I should know, I'm marrying a graphics designer ;)

    --
    md5sum /boot/vmlinuz
    d41d8cd98f00b204e9800998ecf8427e /boot/vmlinuz
  29. OpenGL + FLTK by Mysteray · · Score: 1

    Been using OpenGL and FLTK for a project for a few weeks now. Hope I never have to use anything else.

  30. My recommendations by Gadget_Guy · · Score: 1

    As you have noted, it does take a commitment to learn any system. For personal projects where you answer to no one else, you should use whatever you think will be useful to know in the future. The factors involved are: what will be used for future projects at work, how important is cross platform programming, and what looks good on a resume.

    For cross platform work, Qt is the way to go. Or Java I suppose, but I have found myself moving away from that language. Not for any ideological reason, I've just had a few frustrations with it over time. But you can't argue that it can be handy for the resume.

    Alternatively, if you are interested in web programming, then it is amazing what you can do using HTML (especially HTML5 with its new canvas tag). If you are after a full screen application, then you can try the kiosk modes in Internet Explorer or Firefox. IE doesn't support HTML5 yet, so you would either need to limit yourself down to HTML4 can provide (which still isn't bad) or use Firefox.

    If you want to learn a language that has a compiler installed by default on the majority of computers in the world, then C# is the way to go. While Visual Studio makes it easy to generate the user interface elements, it is also handy to know how to use the language in straight vanilla code so you can use the command line compiler that comes with the .NET runtime. I have knocked out a few quick hacks on other people's systems just with Notepad and C:\Windows\Microsoft.NET\Framework\v3.5\csc.exe.

  31. 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 Anonymous Coward · · Score: 0

      speaking of being behind on homework:

      Swing is built on top of AWT, and Java2D is AWT.

    2. 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.

    3. Re:Swing + Java2D by Anonymous Coward · · Score: 0

      Any look and feel that is not the native look and feel by definition looks terrible. Last I checked, Java still integrated with the system look and feel abysmally.

    4. 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.

    5. Re:Swing + Java2D by SplashMyBandit · · Score: 1

      What is the 'system look and feel' for an application on Windows these days?

      It used to be much more homogeneous but is now pretty varied. Mozilla, Internet Explorer, MS-Office, iTunes, Acropbat Reader, etc etc don't really look like more plain-vanilla windows apps do they? and users don't usually get their panties in a twist over that, so I think this argument was possibly valid when it was made the best part of a decade ago but is pretty much rubbish in this day and age.

      Besides, most people who use my applications *love* the Nimbus look. They seem to think it looks way better than much of the default Windows controls (since they always compliment the looks of the applications when they encounter them), and I have never had a problem where the increased comeliness of Nimbus has resulted in users reporting usability issues. If you know what you are doing then a Java application can look and feel like a 'filthy rich client' that runs very snappily (since Java has stronger support for multi-threading than C++ for example, so you get to make use of all eight or 12 cores on modern systems if you need to). In times past lots of poor programmers used Java and they gave the platform a bad name (and created some phenomenally poor interfaces), but that doesn't mean the tech itself is bad. Fortunately most of these folks seem to have moved on to other platforms (creating low-usability and horrid Javascript interfaces instead).

    6. 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?

  32. 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.

  33. understood, already suggested 3 by Anonymous Coward · · Score: 0

    Its why I said
    http://www.tkzinc.org/
    http://www.wxart2d.org/
    http://www.box2d.org/

    There is also
    http://antigrain.com/

    Heck, depending on his real requirements, a branded copy of firefox3 with plain canvas (or WebGL) might be enough (with jQueryUI/YUI/Google Web Toolkit)

  34. My choice by bbroerman · · Score: 1

    If you want to run on different platforms, my choice would be Java and Eclipse SWT... you have a platform dependent library to send out with your app, but your app code itself is platform independent.

    --
    Logic is the beginning of reason, not the end of it.
  35. HTML Canvas by Anonymous Coward · · Score: 0

    How about HTML Canvas with Javascript? That way it works on any platform so long as you use a modern web browser...

    There are also a few nice JavaScript 2D libraries out there (google it).

  36. I gather HTML isn't enough? by holophrastic · · Score: 1

    Having no clue what you're looking to do, a modern web-browser, or next-gen with graphics accelleration, may be sufficient. I wouldn't suggest it for anything too significant, but between SVG, and general web graphics stuff -- something like imagemagick or yoru favourite command-line image processor -- most interfaces are fairly easy, and a very low learning curve. Heck, in IE you can even transform them with a matrix operation. You'd be using javascript for animation and logic.

  37. 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 simula · · Score: 1

      Qt requires code generation using the MOC utility for classes derived from QObject. Qt uses the code-gen to extend C++ a bit (for introspection) and it's there for legacy reasons (incomplete template support in old C++ compilers). QMake deals with it automatically, but it shouldn't be too hard to create a build-rule for whatever IDE you are used to using.

      Qt-Creator is rapidly growing. Here is Qt-Creator's current support for refactoring and I think refactoring is getting more attention in the next release. On windows Qt-Creator currently supports MinGW and MSVC, along with GDB and Microsoft's CDB for debugging.

      The Visual Studio Qt plugin does work with the open source version, but you are required to build it from source using the MSVC compiler.

      If you are having any other issues with Qt, please feel free to write me.

    3. 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.

    4. Re:Qt has flaws by m50d · · Score: 1

      "Manually"? Any remotely decent build system will let you automate the moc-running - heck, it's only a couple of lines in make, never mind anything more sophisticated.

      --
      I am trolling
    5. Re:Qt has flaws by Anonymous Coward · · Score: 0

      Well this "wonky" Qt Meta Object system has also some nice side effects, like e.g. introspection on DBUS exported objects. When using with qtcreator this "moc compiler" has never made me any problems.

    6. Re:Qt has flaws by JohnFluxx · · Score: 1

      And automatic javascript support. And safe casting on systems without rtti support.

    7. Re:Qt has flaws by Anonymous Coward · · Score: 0

      You can use Qt Creator with Microsoft's compilers. In fact, you've been able to do that since the second release or so. The all-in-one bundle (IDE + compiler + libraries) uses MinGW / GCC, but you can configure it to use the MSVC compilers instead (and either install the pre-compiled MSVC binaries, or build your own).

      Debugging still sucks on Windows, especially with MSVC, but it's not nearly as bad as it used to be...

      It's started getting refactoring support as well...

      http://doc.qt.nokia.com/qtcreator-snapshot/creator-editor-refactoring.html

      A bit basic, still, but getting better.

    8. Re:Qt has flaws by Anonymous Coward · · Score: 0

      He is talking about the paid versions of VS. The free Visual Studio "Express" editions do not allow plugins.

    9. Re:Qt has flaws by Anonymous Coward · · Score: 0

      But does the LGPL plugin work with the free version of visual studio? I'm quite sure that's what was meant by "only works with the paid versions", i.e.

      "only works with the paid versions of visual studio"

    10. Re:Qt has flaws by Anonymous Coward · · Score: 0

      I'll take all you wrote, and then say the opposite. I find Eclipse clunky and slow and Qt Creator intuitive and quick ;)

    11. Re:Qt has flaws by aiht · · Score: 1

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

      While the end result is the same, I'll just clarify for anyone who doesn't know:
      the plugin refuses to install on VS Express because the Express license does not allow it, not because QT/Nokia do not want people using QT with VS Express.

  38. Seconded. by Mr2001 · · Score: 1

    Seconded. Windows Forms is easy to learn, powerful enough to use for most GUI work, and if you stick to the classes that work in Mono, it's cross-platform with little if any changes required.

    --
    Visual IRC: Fast. Powerful. Free.
    1. Re:Seconded. by Tacvek · · Score: 1

      Very true. If one wants to create C# code that is cross platform compatible, I strongly recommend either doing the development on Linux using mono, so you cannot inadvertently use classes that mono does not support, or in the alternative, develop on windows with a continuous integration system that tries to build the software on Linux under mono after every check-in.

      Doing either of those can save you some headaches later, and neither is particularly difficult.

      --
      Stylish sheet to fix many problems in Slashdot's D3: https://gist.github.com/801524
    2. Re:Seconded. by digitalunity · · Score: 1

      You'll quickly run into huge problems depending on which controls you try to subclass.

      Try subclassing a rich text control to add syntax highlighting without using WPF. It can be done, but it is a HUGE pain in the ass. You'll need anger management therapy when you're done.

      Winforms, for all its API sanity and OO goodness, is still just a fancy wrapper for WIN32 GDI - including all the gotchas. If they want me to take it seriously, they need to reimplement these "problem controls" either in the standard GDI library or reimplement them in Winforms.

      --
      You can't legislate goodness. Let each to his own destiny, by will of his freely made choices.
    3. Re:Seconded. by Mr2001 · · Score: 1

      It's not a great idea to use the standard rich text control for syntax highlighting anyway... you should probably be using a highlighting editor control like Scintilla. The rich text control has always sucked, IME.

      --
      Visual IRC: Fast. Powerful. Free.
  39. 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 Anonymous Coward · · Score: 1, Informative

      Glad someone finally mentioned this. You can write one app and have something that works in every major browser and as a desktop application on every major platform, including Android and iPhone. With Flex, you have a very fast path to application GUI development, and with the integration with the rest of the Creative Suite apps you have arguably the best overall set of design tools. AS3 is a solid OOP language to work with. It lacks some of the features of Java and C# (while having a few they don't), but it's great for writing event-driven applications and for working with XML. Of course, Adobe Air doesn't qualify if you need 2D GPU acceleration (and for 3D DirectX/OpenGL support we have to wait until next year).

    2. Re:Easy Choice by Anonymous Coward · · Score: 0

      OK, who's paying the Adobe shills, and more importantly, how do I get in on it?

    3. Re:Easy Choice by Anonymous Coward · · Score: 1, Insightful

      The game League of Legends uses Adobe Air for its interface, and it has been utter shite in performance and stability. Not sure to what degree that is Air's fault versus the developers, but thought I'd add this word of warning.

    4. Re:Easy Choice by Rockoon · · Score: 1

      The Pandora One client is written with Adobe Air.. pretty simplistic UI, but I guess its extremely cross platform.

      --
      "His name was James Damore."
    5. 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
    6. Re:Easy Choice by Blakey+Rat · · Score: 1

      If you've seen the new Adobe Creative Suite, you can see the results of using Air to do more than a simple Pandora-like UI. They aren't pretty: http://adobegripes.tumblr.com/

  40. Sooner or later... by Anonymous Coward · · Score: 0

    HTML, CSS, JavaScript, jQuery, exCanvas, HTML5.

    Sooner or later some potential buyer will demand your app to be on the web. It doesn't matter what kind of app it is. For desktop use, put a browser plugin in an empty windows shell and you are done.

    1. Re:Sooner or later... by Bill+Dog · · Score: 1

      Best suggestion so far, *if* one is already well-versed in at least those first three or four.

      Even if an idea for an app is initially only conceivable as something for one's own use, if it's useful, others will want to use it and you may want to keep your options open for sharing it. And what's more cross-platform, or more accessible, than coding to (upcoming but inevitable) web standards in a browser environment.

      --
      Attention zealots and haters: 00100 00100
    2. Re:Sooner or later... by walshy007 · · Score: 1

      Take your logic to it's extreme, and you would be saying who needs any application except for a browser?

      In modern times I've seen people write emulators in javascript that make quad core machines reel where a native program emulator runs fine on a 486.

      Javascript and it's kin have uses, but when all you have is a hammer everything looks like a nail... and some things should really not be written 'for the web'.

  41. 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 the_womble · · Score: 1

      TCL does compile to byte code so interpreter is not entirely true - but that true of everything these days.

      The language itself is very easy to learn, with a clean and consistent syntax. It does unicode right, it has a fast regular expression engine, it has a reliable sub-interpreter system for sandboxing untrusted code, its entirely cross-platform and it is very easy to create executables for multiple platforms, it has a helpful community and very very useful wiki, its easy to embed, and a lot more.

      The disadvantages are a lack of libraries and things like web frameworks compared to, for example, Python.

    2. Re:For "personal" Apps by tibit · · Score: 1

      OP wants a canvas, not a dinosaur. Tcl/Tk provides exactly zero functionality needed for an interactive canvas.

      --
      A successful API design takes a mixture of software design and pedagogy.
    3. Re:For "personal" Apps by Anonymous Coward · · Score: 0

      Do you have any experience with it yourself? Tcl/Tk actually provides exactly all functionality needed for an interactive canvas:
      The canvas widget canvas provides high level, easily scripted access to an object based drawing board, to which all kinds of events can be very easily coupled.
      Try it out; find some simple examples at the wiki, e.g.
      http://wiki.tcl.tk/2859

    4. 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

    5. Re:For "personal" Apps by Bent+Spoke · · Score: 1
      To further clarify, if you need to "draw" advanced features such as antialiased lines/shapes, Tkpath is required. Otherwise, simple shapes, images and widgets work well in the standard canvas.

      For shaped toplevels ala skinned interfaces, see shaped windows

    6. Re:For "personal" Apps by ishobo · · Score: 1

      You are a dumbfuck. Stop commenting on something you know nothing about.

      --
      Slashdot - The great and glorious cluster fuck of Internet wisdom.
    7. Re:For "personal" Apps by tibit · · Score: 1

      Tk provides a proof-of-concept canvas. Something that basically shows how it could be done, and how a nice API might look like, but provides a far cry, functionality-wise, from what one gets with Qt, and what one would expect to get in real application development. So as far as I'm concerned, it doesn't exist.

      Specifically:
      - no support for items of arbitrary shape (for this you need painter paths and path strokers),
      - no support for variable level of detail (likely because there are no complex items anyway),
      - no support for user-defined items within Tcl -- you need C code for that,
      - no support for arbitrary transformations (no rotation/shears),
      - no model/view (the canvas widget contains its model -- model can't exist without the view),
      - no hierarchy -- all items are stored in an array called the display list, there is no parent/child relationship,
      - no support for embedding Tk widgets (you can "embed" widgets, but they are top-level native widgets),
      - it's not explicitly mentioned if there a spatial index (say a BSP tree)?

      --
      A successful API design takes a mixture of software design and pedagogy.
    8. Re:For "personal" Apps by tibit · · Score: 1

      OK, I was wrong. s/zero functionality/toy functionality/. Doesn't change things for much better IMHO.

      --
      A successful API design takes a mixture of software design and pedagogy.
    9. Re:For "personal" Apps by ishobo · · Score: 1

      You still have no idea what you are talking about. Is there place that makes people willfully ignorant, maybe a dumbfuckary?

      --
      Slashdot - The great and glorious cluster fuck of Internet wisdom.
    10. Re:For "personal" Apps by tibit · · Score: 1

      Look, I have plenty of experience using Qt's graphics canvas system. I have read through the docs of Tk canvas, and I have got myself to play with the Tk canvas yesterday. The latter is a toy, when compared to Qt's QGraphicsItem/Scene/View. So unless you give me some hard facts and address the shortcomings I gave in the other post in this discussion, you're just flamebaiting.

      --
      A successful API design takes a mixture of software design and pedagogy.
    11. Re:For "personal" Apps by ratboy666 · · Score: 1

      tibit

      What I find fascinating is your distinction between "toy" and "real" functionality. Canvas, to be useful to me, must remain simple. I only use it every 6 months or so, and I don't (typically) have time to read up on it.

      I "hack" up a quick & dirty thing, run it a few times and then throw it away. Really, the original question was about "personal" programming.

      Typically, I try to generate the graphic (if static) with a spreadsheet first; or gnuplot. If interactive, I try to feed gnuplot instructions, or use OLE and DDE (if I remember how, normally, my attempts in that space don't work out quickly enough). If that doesn't do it, or I need mousey input, I turn to tcl/tk.

      Qt is way overkill. The only way I could do that is by building a bunch of templates, and cargo-culting it from there.

      If I want Qt, I'll throw the prototype over the fence, and get some folks in development to redo it.

      --
      Just another "Cubible(sic) Joe" 2 17 3061
    12. Re:For "personal" Apps by tibit · · Score: 1

      Qt's power is precisely what you want it for: your prototype can be that much closer to the real thing. IMHO, of course. This is to a point where developing a semi-working mockup of a vector graphical editor with rather advanced functionality (path stroking, filters, etc) can be done in a day.

      --
      A successful API design takes a mixture of software design and pedagogy.
    13. Re:For "personal" Apps by ishobo · · Score: 1

      I am not baiting at all. The problem is you have a strange definition of toy. I suppose Tk is a toy in the same manner as Linux. Of course, that does not stop people from using it. I would never base my embedded product around something as poorly designed as Linux compared to Integrity or QNX.

      Two can play that game.

      --
      Slashdot - The great and glorious cluster fuck of Internet wisdom.
    14. Re:For "personal" Apps by tibit · · Score: 1

      My definition of a toy goes hand-in-hand with how much productivity is afforded by it. Tk's canvas's functionality was AFAIK available and surpassed already in Qt's graphics canvas in Qt 3.x. Qt 4.2 had a completely redone canvas system that is pretty much state of the art.

      For hard realtime applications -- yes, stock linux kernel is a toy. If you need realtime performance, that is. Not all embedded products need it. I'm not familiar enough with various realtime extensions and patches to linux kernel to know whether the linux kernel becomes less of a toy then.

      You also need to compare apples to apples, as QNX is a whole distribution, not merely a kernel. I presume that, say, WindRiver Linux coupled with Qt Embedded provides similar feature set to QNX.

      --
      A successful API design takes a mixture of software design and pedagogy.
  42. Some thoughts: by goffster · · Score: 1

    Java/AWT pro: tends to work on all platforms. con: your app generally tends to look bad on every platform.

    Java/SWT: pro: tends to work well on all platforms. con: you might have to drink the eclipse kool-aid

    Tcl/TK: It is a silly language. You don't want to go there.

    OpenGL pro: "gui" portion tends to work on all platforms w/tweaks. con: hard to work with unless you adopt some toolkit.

    In practice, however, if you really only care about Windows, write windows native code and allow WINE to take care
    of the rest.

    1. Re:Some thoughts: by Philotomy · · Score: 1

      That "con" of your app generally looking bad on every platform with AWT may not apply if you're drawing custom objects to a canvas, rather than relying on AWT widgets.

    2. Re:Some thoughts: by ishobo · · Score: 1

      Tcl/TK: It is a silly language.

      Only for really stupid people. If you have trouble understanding command and arguments, you need to find an activity that requires little thought processing, such as greeting people at a WalMart.

      --
      Slashdot - The great and glorious cluster fuck of Internet wisdom.
  43. What you know, C#, HTML, Java - in that order. by Anonymous Coward · · Score: 0

    Windows GUI stuff is best done in C# .Net.

    Cross-platform GUI stuff is best done in either DHTML (with an appropriate widget library like jQuery UI) or in some circumstances, Java Swing or SWT.

    That said, if this is personal project then you should probably pick whatever GUI toolkit is most popular for the language that you know best.

    1. Re:What you know, C#, HTML, Java - in that order. by javajosh · · Score: 0

      Yes, this sounds reasonable. I'd add Flash/Flex to the DHTML mix, too.

  44. Enlightenment Foundation Libraries by DrJimbo · · Score: 1
    link

    The EFL begins with Evas, our canvas library. Because Evas is built on several different selectable engines (Linux FrameBuffer, DirectFB, X11, OpenGL/OpenGL-ES, QTopia, etc) the platform is extremely portable, which translates thru to all of the libraries built on top of it.

    Hey, if they were good enough to run a Brazilian fridge, they should be good enough for you. Seriously though, you should take at look at the EFL. They are flexible, powerful and efficient. There will be a learning curve with whatever libraries you choose to use. You might as well get something wonderful in return for your investment of time and energy. You want the efficiency of OpenGL without the limitations? You got it.

    --
    We don't see the world as it is, we see it as we are.
    -- Anais Nin
    1. Re:Enlightenment Foundation Libraries by tosszyx · · Score: 1

      I'm interested on hearing more experiences about this, I've known the EFL for a while, but haven't hear any expereices about it out of Enlightment, especially not on cross plataform aplicataions. Any thoughts/experiences ?

  45. OpenLaszlo by ericferris · · Score: 1

    If the OP is looking for a Web-based GUI, then consider OpenLaszlo (http://www.openlaszlo.org/).

    --
    Fantasy: http://ferrisfantasy.blogspot.com/
  46. Pen and paper by Anonymous Coward · · Score: 0

    Then stick it to your monitor.

  47. Adobe AIR by Anonymous Coward · · Score: 0

    I use Adobe AIR. It's got both standard components (buttons, checkboxes, etc), as well as 2d and even 3d APIs for drawing custom components. You can draw stuff programatically or you can use Flash's tools. The exact same code runs on Windows, Linux, and Mac too. I don't know what sort of 2d custom objects you need, but I've really enjoyed working with it.

  48. Documentation, Cross-platform, Stable by drolli · · Score: 1

    Tcl/Tk, Swing, and (for mathematics) the Matlab GUI served me well (even if the latter one is single-threaded and awkward, its a productive and stable environment).

  49. Clutter by Anonymous Coward · · Score: 0

    Intel has sponsored development of Clutter for MeeGo. List of features from that site:

            * Scene-graph of layered 2D interface elements manipulated in 3D space via position, grouping, transparency, scaling, clipping and rotation.
            * Animation framework, providing path interpolation, transitions and other custom effects via implicit animations.
            * User Interface definition format, based on JSON, for describing layout and animation.
            * Advanced input event handling, including multiple pointing devices.
            * Custom Pango renderer providing efficient internationalised UTF8 text rendering through OpenGL.
            * Support for high end OpenGL features such as Shaders, FBO, VBO and PBO through a low-level, object oriented abstraction API.
            * Support for media playback with GStreamer, Cairo graphics rendering, GTK+ embedding, Box2D physics engine, etc.
            * Object oriented design via GObject with a familiar GTK+ like API.
            * Runs on Linux, Windows and OSX with native backend window system support for GLX, EGL (both on X11 and framebuffer surfaces), WGL and Cocoa.
            * Support for mobile devices with fixed point internals and portability across Open GL, OpenGL ES 1.1 and OpenGL ES 2.0
            * Developed in C, with language bindings for Perl, Python, C#, C++, Vala and Ruby.

    1. Re:Clutter by nadavwr · · Score: 1

      I'm very interested in Clutter. Wish I had the mod points :)

  50. would adobe flash work? by Anonymous Coward · · Score: 0

    need the final application to work in Windows, check
    runs on linux, check
    can be used to build 2d apps, check, lots of games and utilities to attest to this
    "will need to use a canvas to paint custom objects", i'm truly not sure, i just play the games, could someone else address this point on whether it includes a internal paint app or if you have to import images from another product?
    low initial time investment, again not sure though i know there are some tutorials on newgrounds and such, otoh such tutorials are more focused on games
    hope it helps

  51. Just don't use linux by Anonymous Coward · · Score: 0

    It has only 0.78% market share, just use Windows development tools like the 90%+ of normal people who get laid instead of fleshlighting to tentacle porn.

    1. Re:Just don't use linux by Anonymous Coward · · Score: 0

      but what about Mac OSX?

  52. SVGAlib by anarkhos · · Score: 1

    You may as well. Toolkits are the bane of human interface design. Each one behaves differently.

    --
    >80 column hard wrapped e-mail is not a sign of intelligent
    >life
    1. Re:SVGAlib by canistel · · Score: 1

      Why stop at the toolkit? May as well write your own kernel while your at it...

  53. OpenGL, Quartz by atrus · · Score: 1

    Most portable? OpenGL. Has the benefit of not requiring huge libraries ala Qt. Consider sticking to OpenGL ES 2.0. Most useful? Quartz/CoreGraphics. Not a portable choice of course, but a good drawing toolkit none the less.

  54. HTML5 Canvas by n3xu5 · · Score: 1

    I have recently begun looking into developing for the iPhone and similar mobile devices, with a desire to be able to draw arbitrary diagrams/images/etc. I honestly did not notice how far the Javascript and HTML stuff had come along in the recent versions of browsers. With the addition of the canvas tag to most popular browsers, lots of useful applications are now feasible without heavily relying on the server-side for much.

    While I wouldn't consider myself "old school", the bulk of my HTML coding skills were picked up by extensive use of the "view source" option of Netscape in the mid-90's. Javascript/Livescript were of limited use back then, by comparison. Newer web browsers combined with tools like JQuery and JQueryUI make doing all of the dynamic HTML stuff that was a nightmare only a few years ago, fairly tolerable for web applications.

    In summary, unless it is just a horrible fit, I plan on targeting web applications when possible. I'd suggest you at least give it a look....you might be impressed with what is now available and possible.

  55. 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.

    1. Re:JAVA + SWING by Laz10 · · Score: 1

      I never get any modpoints any more, but if I had I'd mod you up.

      For a personal app, the time and effort it takes to get it done also counts and here Swing and Java2D are well thought out.

      Another hint.
      Last I tried any drawing in java was 5 years ago.
      I found it easy to set up a look that kept redrawing my canvas every 500ms.
      I then ran the program through the debugger in eclipse, and I could see the image change as I changed the code, due to javas hot code replace.

      Now a days I wouldn't write java code in my spare time.
      Scala is more entertaining, and Scala also takes the pain out of Swing applications.
      Take a look at this spreadsheet demo application:
      http://www.cs.helsinki.fi/u/wikla/OTS/Sisalto/examples/html/ch33.html

      Example is from Programming Scala. Best programming book I have read in years.
      http://www.artima.com/shop/programming_in_scala

  56. Just pick one. by Anonymous Coward · · Score: 1, Insightful

    It really doesn't matter which one you pick. They all have strengths and weaknesses. Choose one and become an expert.

    No matter which one you pick, I promise you it will be the wrong choice, and you will eventually come to understand why it is wrong, and you will pick a different one. Then you will lather, rinse, and repeat. In a decade you will come back to your original choice, and you will understand that it is your best answer because it's the one you know backwards and forwards.

  57. GNUstep, CocoaTron, or Cappuccino by Anonymous Coward · · Score: 0

    http://cappuccino.org/
    http://www.gnustep.org/
    http://www.cocotron.org/

    All three offer great 2D drawing canvas, NSView/CPView, as well as standard high level GUI objects and rich text. See CoreGraphics or DisplayPFD

  58. UserExperienceGuy by Anonymous Coward · · Score: 0

    HTML, CSS, JavaScript. Turn you app into a webapp. Easier learning curve too. Maybe GWT.

  59. Qt by Anonymous Coward · · Score: 0

    From experience, Qt has a fantastic 2D painting API. You weren't clear as to what you were talking about with respect to 2D, so I assumed widgets are not important.

    Qt widgets, on the other hand, suck. HTML + JavaScript has better widget support. In my humble opinion, shipping a commercial Qt app, the lack of polish really gets to you.

  60. Qt is the only choice by Anonymous Coward · · Score: 0

    Really, its all about QT. Cross platform, extremely functional, easy to use, fast.

    OpenGL is portable, but I would think that development effort (less of it) is more important than squeezing out every last bit of performance and exponentially increasing development time with OpenGL.

    I would also say that you should only really be looking at Windows, OSX, Linux here, because if you want to develop for Ip*[d,n][$,e] or android that your interface is going to be very specific to the device and that cross platform isnt really an option for the interface. touch on ipad vs ipod vs android vs mouse on Win, Linux, OSX suggests that the interface cannot be good on any if it works on all.

  61. The thing that would be most useful to you is ... by Anonymous Coward · · Score: 0

    ...to get to a psychiatric ward and have them rid you of your delusions of being able to extract the few answers toa question like this on slashdot which:
    1) Are actually intelligently given with reasonable knowledge of the subject.
    2) Pay attention to what you are looking for.

    Just saying...

  62. Rectangular usually by Anonymous Coward · · Score: 0

    I usually go for a X-Y rectangular coordinate foundation, though sometimes I try polar, which is pretty cool. Wait, what was the question?

  63. There's always the option of no framework by solid_liq · · Score: 1

    I had the same dilemma, except I also knew I would eventually add 3D graphics as well. I wanted it to be portable to anything, and I needed it to render accurately and with proper anti-aliasing (anti-aliased while drawing, not via a filter after the fact). After mulling over all the options, I came to a difficult conclusion: write it myself. This is more work than I'd like, but it allows me to ensure it will run on anything, anywhere. If something new comes out that I want it to run on, I just port to it; I don't have to beg a vendor for it to be ported for me. Performance isn't paramount to my application, so I can put enough abstraction layers in to make the porting process relatively easy. All frameworks seem to put performance as the highest priority, which gets rid of the ease of portability. If your application will render graphics that sit still most of the time, this may be your best option (assuming you know linear algebra if you want vector graphics, and know graphics programming regardless).

    This option worked for me.

    1. Re:There's always the option of no framework by pinkeen · · Score: 1

      I also like to write things from scratch but often I would also like to finish the project I'm working on before the world ends, so this leaves us with Qt. Fine grained abstraction, raster and vector drawing, even wrappers for OpenGL functionalities. Not to mention many helpers. You probably won't see a line of native os api code in your project.

  64. 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.

    1. Re:Also, don't forget Qt Quick and QML by gbjbaanb · · Score: 1

      don't knock QT Quick so quickly :)

      ahem, ok - I read this article on ArsTechnica about QML, the author describes an app he's written that was partically all QML and "It was a weekend project that required surprisingly little effort. These kinds of applications are trivially easy to make with Qt.

      Ok, he hasn't done the full write up yet, but there's enough tease in that article to make you think QT is going places.

  65. Try the HTML 5 Canvas by andyverbunt · · Score: 1

    Why don't you try the HTML 5 Canvas?
    HTML 5 is an emerging technology (or rather a set of technologies), and since it's a personal project anyway, you'll have a good opportunity to learn something new.
    Once the technology matures, and your project is finished, you'll be able to disclose your application in most modern browsers (including Safari on iPhone, iPad, etc.)

  66. Ask better questions by mwvdlee · · Score: 1

    He wants to draw 2D stuff on a canvas.

    What kind of 2D stuff? You want to draw individual pixels? Generate bar charts? Animate anti-aliassed splines? Interactive objects?

    If you're after only the most basic without any real need for performance, then use whatever you're already familiar with.

    Otherwise please specify what kind of features you want from the 2D framework so you won't have to wade through dozens of replies advising this GUI toolkit over the other GUI toolkit even though the word GUI isn't even mentioned in your question.

    --
    Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
  67. Tcl/Tk by Anonymous Coward · · Score: 0

    It's hands-down my favourite. I've come full-circle back to this one, after going GTK+, Java Swing and others. I was amazed at how much this lovable, small toolkit has advanced in the meantime, without becoming more complicated. Watch the others (e.g. GTK+) going full-bore the way of the XML: they are becoming more and more denial-of-service attacks, towards us and towards our computers.

    Tcl/Tk still remains to me an example of good engineering. Definitely worth checking out.

  68. Time investment? by shutdown+-p+now · · Score: 1

    Any new tech is going to require "considerable time investment" to learn. You aren't dodging that bullet either way.

    That said, going for something high-level will at least save you some time in the long term, once you get past the "getting started" stage. Which, in my opinion, leads to three practical choices, given your constraints: JS & HTML5 canvas, C++ & Qt, or C# and WPF.

    Of those three, WPF is likely the easiest one if you need vector graphics and various transforms, with Qt a close second. You might also want to look into Qt Quick, which is not all that dissimilar to WPF in concept, and uses JS for scripting - though that is very new stuff and there may be few good learning materials about it.

  69. AWT by Anonymous Coward · · Score: 0
    If you want to make a program that nobody will enjoy using, then by all means choose AWT.

    Go ahead, mod me down. You know it's true.

  70. Qt by larppaxyz · · Score: 1

    Go for Qt/C++. Your application is then available for Windows, Linux, Symbian and Maemo/Meego. Qt Creator is great tool to make user interfaces and using WRT is something to take a look at also. For a quick start go to http://qt.nokia.com/downloads and see some tutorials.

  71. Clutter by MattBD · · Score: 1

    How about Clutter? It's implemented in C, but has bindings for C++, Perl, Python, and Ruby, among others, and it makes it pretty easy to create custom animations. The documentation looks OK, and it'll work on Windows, OS X or Linux.

  72. XUL and SVG by Anonymous Coward · · Score: 0

    Or you could go the web direction and use XUL (based on xulrunner) and SVG to paint. Fast learning curve.

  73. A Good IDE is most important by martin_lovick · · Score: 1

    Having used a variety of GUI toolkits under different OS (AWT, .NET, MFC, Qt, OpenGL). In my opinion the most important thing to have is a good GUI builder tool. Most of the IDEs these days come with GUI building tools and also the GUI tools can for the most part be plugged into IDE. That said, I have found Qt quit good when plugged into Eclipse.

    1. Re:A Good IDE is most important by martin_lovick · · Score: 1

      also, when youve mastered one GUI toolkit its fairly straightforward to pick up others

  74. FIREFOX by Anonymous Coward · · Score: 0

    You should be using a HTML canvas with Javascript in Firefox. Firefox is very portable.

  75. Definitely Qt by pinkeen · · Score: 1

    If you want to save yourself a huge amount of time choose Qt. Great, comprehensive docs, dedicated IDE with WYSIWYG GUI designer. There is even a type of canvas that lets you write objects that can react to events and be dragged around while not sacrificing the power of plain raster drawing.

  76. 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 Kagetsuki · · Score: 1

      I've done Windows API and MFC as well as a little .NET other than wxWidgets (in both C++ and Ruby). wxWidgets is actually kind of messy but much nicer than MFC if you ask me, as far as .NET it really shows how much (financially backed) effort MS put into that but when I used it I had a variety of issues. Anyway, wxWidgets works and I don't plan on going back to anything else at the moment. I can't say I "recommend" it more than I would say "it does what it was made for and works; so I have no problem with it". The whole XML based interface feature they have now really needs better documentation - I have never gotten it working and I still think it would be nice to allow the user to customize the interface through an external file.

    2. 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 :)

  77. QT All the Way by hardgeus · · Score: 1

    I am very leery of APIs. It takes a lot to sell me. I started using QT just before the move to QT4, and instantly fell in love. At this point, unless I'm writing a game, I won't even touch C++ without using QT.

    QT is the most consistent, well-documented, and intuitive API I have ever used.

    1. Re:QT All the Way by hardgeus · · Score: 1

      BTW, if you're not writing a windowed app, and are only interested in the canvas, you might want to look at SDL. You didn't specify exactly what you were working on.

      Soo...if you're writing a windowed "productivity" app, use QT.

      If you're writing a custom-graphics heavy app like a game or maybe some sort of visualization tool, use SDL.
       

  78. Java 2D by umarekawaru · · Score: 1

    'm writing a beautiful musical notation app in Java. It runs unmodified on Windows and Mac ( all versions). I have not tested on Linux. On my old Mac tower 867MHz, my program can play, and highlight 32nd notes. http://en.wikipedia.org/wiki/Thirty-second_note The notes are calligraphic WYSIWYG rendered using Java 2D ( not fonts) and fully printable. I chose Java for its vast libraries(packages). The GUI interface was a bonus. Very easy See another example of an app written in Java: http://www.strata.com/products/strata_3d_cx_suite/strata_live_3d_cx/

  79. OpenFrameworks and Processing by Anonymous Coward · · Score: 0

    There are some really simple frameworks that you can use such as OpenFrameworks(C++), and Processing.org (Java) these integrate everything you need to use in 2D graphics , image and video loading and rendering and 3D in OpenGL. These are cross-platform working in Windows, Linux and Mac. It is easy to integrate QT for GUI in OpenFrameworks. Both frameworks use other known libraries such as OpenCV, Poco. They can easily integrate server/client comunications, load 3DS data.

    These are great 2D Multimedia frameworks. Use them.

  80. Ruby/Shoes was the first thing that came to mind by Anonymous Coward · · Score: 0

    Whether or not you end up using it, you have got to see how ruby/shoes works to appreciate such a simple-to-use toolkit that offers intermingled widgets and the ability to draw anywhere on the window.
            https://github.com/shoes/shoes/wiki
    It's built upon Cairo for 2D drawing and Pongo for text rendering.

  81. C#, Windows.Forms, and Managed DirectDraw by Dwedit · · Score: 1

    Right now, I'm using C#, Windows.Forms, and Managed DirectDraw for graphics. DirectDraw is very fast at creating and rendering graphics, it does a good job. It's a little tricky to set up, but performance is much better than System.Drawing.
    I do get tons of warnings that my code is using classes which are marked as deprecated, and the built in XML documentation is also drowned out with a big long warning about how DirectDraw is deprecated, blah blah, then finally when you look at the last sentence, there's your actual documentation.

    Also, the program is made for a Windows XP machine, and refuses to run on another Windows 7 machine. I have no idea which dependency it doesn't like.

    For C#, SDL is a non-starter. There is an SDL library available, but you are restricted to only using the single SDL window that's created, you can't make other windows or controls in that window. There is also a SDL panel control for Windows Forms, but it's a bad joke that draws to the screen by assigning System.Drawing.Bitmap objects.

    1. Re:C#, Windows.Forms, and Managed DirectDraw by kantos · · Score: 1

      Right now, I'm using C#, Windows.Forms, and Managed DirectDraw for graphics. DirectDraw is very fast at creating and rendering graphics, it does a good job. It's a little tricky to set up, but performance is much better than System.Drawing. I do get tons of warnings that my code is using classes which are marked as deprecated, and the built in XML documentation is also drowned out with a big long warning about how DirectDraw is deprecated, blah blah, then finally when you look at the last sentence, there's your actual documentation.

      Also, the program is made for a Windows XP machine, and refuses to run on another Windows 7 machine. I have no idea which dependency it doesn't like.

      For C#, SDL is a non-starter. There is an SDL library available, but you are restricted to only using the single SDL window that's created, you can't make other windows or controls in that window. There is also a SDL panel control for Windows Forms, but it's a bad joke that draws to the screen by assigning System.Drawing.Bitmap objects.

      The one SDL object per form...that is because WinForms is very thinly wrapped MFC/GDI+ and while for very simple UI applications it works great. It is fundamentally limited due to the fact that it is legacy reaching back to the 16bit windows days and is dependent on USER and GDI objects (these are very limited resources) and also has NO hardware acceleration on most machines.

      As for DirectDraw... that IS the reason it doesn't work on Windows 7, Microsoft doesn't even ship those libraries to 7 unless they are specifically installed by the user, and why would they! They have Direct2D, a well designed (but currently buggy because it's new) framework. If you're programming .NET and want access to that power just use WPF which is a thinly veiled layer over DirectX10 (with a built in back compatiblity layer for XP) with some basic work already done for you. Why would you waste your time programming on an obsolete (and soon to be removed) component, when there is a fully supported, well documented framework already available!

      While I know the OP wasn't interested really in 3D as a C# guy I have to give a shout out to XNA which has some excellent 3d capabilities from a managed language, I wish that MS would allow others to implement XNA as it would be a major boon to linux gaming if they did

      --
      Any and all content posted above may be ignored, considered irrelevant, or otherwise dismissed.
  82. JavaFX succeeds Swing for rich GUI development by Anonymous Coward · · Score: 1, Interesting

    You really should be looking at JavaFX instead of Swing if you're interested in creating rich GUI environments in Java. You can get a good sense of the future of each of these technologies on Amy Fowler's blog. Amy was one of the founding members of the Swing toolkit - she knows what she's talking about. It's not always what Swing developers want to hear, but you know, life goes on.

    1. 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).

  83. Discussion on Java Swing vs. Qt, also JavaFX by umarekawaru · · Score: 1
  84. I'm no Microsoft fan... says a Microsoft fan by Anonymous Coward · · Score: 0

    blah blah blah... "even though I'm no Microsoft fan"

    The obligatory remark which all Microsoft fans feel obliged to tack on to their Microsoft promotion.

    You're not fooling anyone.

  85. /dev/draw of course by Anonymous Coward · · Score: 0

    you can get it from plan9port if you're not cool enough to run plan9. easiest drawing ever

  86. The language for the model by tepples · · Score: 1

    A different way to do is to decompose your GUI along MVC (Model View Controller) lines and make different View layers for the different OS's/toolkits.

    I advocate such a multitier architecture as well where it is practicable. But it breaks once your customers demand ports to platforms that cannot run the language of your application. For example, the publicly available tools for Xbox 360 and Windows Phone 7 devices can run only verifiably type-safe CIL, and standard C++ compiled to CIL[1] is not verifiably type-safe. BlackBerry can't run C++ either; it can run only Java bytecode.

    [1] Details: C++/CLI allows mixing managed and unmanaged pointers but uses two incompatible syntaxes. Code using the managed syntax will not compile in a standard C++ compiler, and code using the unmanaged syntax will compile to CIL that fails verification.

    1. Re:The language for the model by koro666 · · Score: 1

      Code using the managed syntax will not compile in a standard C++ compiler, and code using the unmanaged syntax will compile to CIL that fails verification.

      Nothing that can't be fixed through abuse of preprocessor macros, though.

  87. Qt, FLTK by Jorl17 · · Score: 1

    Many people are either choosing or bashing Qt.

    When I first got into the "GUI Scene", I used windows and built everything with plain old Win32 API. Painful, but worked. Then, as I moved to GNU/Linux, I tried to port my apps with WxWidgets. It might have been because I was new to it, but WxWidgets felt awful, painful, bloated and "unnatural programming". (I'm talking C++, btw). Then I tried Qt and also found it awful, messy and confusing. Thus, I chose FLTK and managed to build many apps around it. It is simple, direct, not bloated (though not "extremely feature rich" either) and pleasing on the eye if you work it out ok.

    A year after that, I decided to improve some of my apps to get some new features in. Thus, I re-wrote most of my apps using Qt and I changed my mind about it. Qt is easy to use -- it feels natural --, it isn't bloated (as some people say), it is beautiful and easy to modify, it is the most well documented toolkit I've ever seen, it integrates well with so many OSes and it has the amazing qt-make.

    I also had to develop using GTK some time after that. It didn't feel "wrong", but it felt a bit "archaic" and too "functional" -- I prefer OOP.

    So, yes, my humble opinion is that Qt is awesome. Then, FLTK is very nice to use, learn, improve, etc...

    --
    Have you heard about SoylentNews?
  88. SDL or WxWindows by Anonymous Coward · · Score: 0

    OpenGL is very cross-platform, but based on your description of painting on a canvas, it's probably not what you want.

    Have you taken a look at SDL? That framework is also supported on every platform you could imagine, and unlike OpenGL it provides a variety of system level support functions, joystick input, video and audio, and some other helpful basics. SDL is used by a very large number of open source and indie games. I believe PyGame is based on SDL, in case you want to program in Python instead of C/C++.

    Also, depending on what sort of interface you want to build, check out WxWindows. I believe that framework is primarily the basic set of common UI elements (window, text field, button, checkbox, etc.), supported on multiple platforms, and you should be able to do a paintable canvas pretty easily. It's programmed in C++.

  89. 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.

  90. JUCE by Anonymous Coward · · Score: 0

    Seems odd that nobody has mentioned JUCE yet.. http://www.rawmaterialsoftware.com/juce

    It's a nicely-written Qt-style C++ library. Dr Dobbs actually rated it more highly than Qt in their Jolt awards a couple of months ago: http://www.drdobbs.com/blog/archives/2010/09/jolt_awards_and.html

  91. BufferedImage by Latent+Heat · · Score: 1

    What you want is Java's BufferedImage class. Nearest thing to a frame buffer where you can set individual pixels. You can map it to a graphics context and draw lines and characters on it. Best thing since the days of raw VGA.

  92. 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/

    1. Re:Processing by kisrael · · Score: 1

      Well, the 3D isn't quite "fancy pants" but yeah, I totally agree.

      There's also processingjs, which is a javascript flavor of it (though IE support seems to be missing)

      http://openprocessing.org/ is a pretty neat view of what can be done

      --
      SO YOU'RE GOING TO DIE: The Comic for Dealing with Death
  93. Be sure to check out WPF with Physics2D.Net by RobinH · · Score: 1

    A little while ago I needed a 2D physics simulator, and I was using WPF. I used Physics2D.Net as the engine, and WPF for rendering. It uses an MVVM architecture. The whole thing was open-sourced (LGPLv3). If you happen to go down the Windows route, it's worth a look. Here's an article I wrote about it.

    --
    "I have never let my schooling interfere with my education." - Mark Twain
  94. 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.

  95. Tcl/Tk by dskoll · · Score: 1

    It's very easy to get up to speed with Tcl/Tk. I know it has a bad reputation, is seen as old and stodgy and is derided as being ugly.

    In reality, Tcl/Tk is implemented with beautiful, clean code. It has excellent geometry management (the packer, gridder and placer are second-to-none for making windows that adapt to changing geometry gracefully.) Its Canvas object is well-implemented and simple to use --- it was the inspiration for the GNOME canvas widget, AFAIK.

  96. XNA? by coryking · · Score: 1

    If you are doing mainly drawing, and not GUI (ie traditonal GUI widgets on a traditional window with with traditional GUI events) you might want to look into XNA. It is basically a managed version of DirectX. Because it is .NET you can hook into winforms and WPF to create the occasional "traditonal" GUI.

    Otherwise, if it is a windows app, there is no better choice than WPF. It is intimidating at first because with WPF you can easily reskin just about any uielement (and create UIelements from any class you create). But once you realize how classes and the actual UI are separate concerns that are joined only through very sophisticated data binding, you will be in love.

    Complicated little beast though and if you come from a winforms background be prepared to do some major unlearning as how you bind data and events to the GUI is conceptually different. If you simply bind to "Button_OnClick" like you did in winforms you are doing it wrong. If you find yourself writing this.textbox1.text = myData.price in your code you are doing it very, very wring.

  97. Piccolo2D is excellent by Anonymous Coward · · Score: 0

    I highly recommend the open-source Java 2D-based Piccolo2D framework. I've been using it for a sophisticated project for several months now. It is well-designed, easy to learn and highly flexible.

  98. 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.

    1. Re:choose Qt only after careful consideration by sznupi · · Score: 1

      Fully supported port is also on WinMob (Nokia doesn't make any of those; and not only Nokia makes Symbian and Meego devices BTW) - and it's portable enough to have an experimental port on every platform, done by hobbyists...

      --
      One that hath name thou can not otter
    2. Re:choose Qt only after careful consideration by NuShrike · · Score: 1

      "experimental port". That's worse than writing code in Silverlight because you're already halfway in a hellhole with no end in sight.

      And did you notice I've talked about WinMob. Or how Qt eats 50% of available virtual memory for ALL processes when each only gets 32MB maximum? I know Qt/WinMob well as I also did some experimental backend retargeting for DirectDraw as well as straight Qualcomm-OGLES and discovered just how bad Qt's renderer is.

      Or how they don't really support it past WM6.1: they're ignoring the necessary patches to compile cleanly targeting WM6.5 SDK as well as not using -Os which would eliminate at least 5-10% of the code and virtual rss bloat? Another ignored WM6.5 patch would've enabled LayerWindows API support. Oh well!

      Stick with what is in production by a lot of people there already making money. Skia is another 2D ui option as a subset is used by Webkit Android.

      There's also some 2D UI attachments for Ogre/Irrlicht that you could try exploring too.

    3. Re:choose Qt only after careful consideration by sznupi · · Score: 1

      That line there seemed more about portability of Qt itself. Vs. how some (presumably) hobbyists do mostly working ports left and right. And at least quite a few new Symbian apps do use it (as well as ongoing changes to the OS); quick search finds a few non-Nokia examples (+GENIVI Alliance...) / I'm not sure how much more portable other largely hobbyist & non-universally supported projects can be...

      --
      One that hath name thou can not otter
  99. Pencil and paper by Anonymous Coward · · Score: 0

    K I S S

  100. Well, I dont think this answer will get much love. by Anonymous Coward · · Score: 0

    Well, I dont think this answer will get much love from the /. crowd -- (if you dont want to spend 10000 hours developing your app) the only reasonable cross platform solution today is Adobe AIR. Its free, its cross platform and it will also work on phones (sans the Apple iPxxx devices)) Eventually HTML5 style solutions will emerge - but not really ready for a deployment today.

  101. It depends, but not really by pheonixus · · Score: 1

    If the poster is looking to develop on Windows or OSX, its possible that the most robust solution would be to use the native OS windowing toolkits.

    The "big players" on linux, Tcl/Tk, X/Motif, GTK, Qt, OpenGL, or SDL.
    I would personally suggest GTK/Cairo for ease of use, Qt for anything more complicated than a widget, and OpenGL if the application is intended to accomplish anything graphically sophisticated.
    The choice between these is bounded by several factors, but all of them have perl bindings, which can make development time almost nil compared to writing the actual graphics routine(s).

    If portability, speed, or you just love using a strictly typed language, you might look into learning Cairo, writing your routines once, and then trying them out in the various toolkits as buffered images to see which allow any freedoms you might need, and any additional controls/ui functions (need threads?).

    but thats just my two sense.

  102. What about Flash? by Anonymous Coward · · Score: 0

    Good old flash, can't beat flash! Does all you need and more, quick and simple for rapid prototyping. Vector graphics and/or bitmap + animation classes. You'd probably find libraries and even tutorials for everything you need.

  103. GTK + Cairo by zmooc · · Score: 1

    I use GTK with Cairo for my custom widgets (like these http://zmooc.net/miep/too_many_knob18.png). It works pretty OK and is rather well documented an, but I run into performance issues just about everywhere. Probably mostly due to my incompetent coding, though:P Nevertheless, I would not recommend taking the GTK-path.

    --
    0x or or snor perron?!
  104. #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)
  105. For Java or OOP, Learn Design Patterns by umarekawaru · · Score: 1

    Most Java APIs ( Java 2d, Swing, JavaFx, 3D,...) are arranged in Design Patterns ( http://en.wikipedia.org/wiki/Design_pattern_(computer_science) ). I learned them with Head First Design Patterns but there could be a better book out. The APIs are elegant where once they seemed convoluted.

  106. HTML, Mono or Qt by LostMyBeaver · · Score: 1

    HTML is a great way to write apps these days. You can program widgets the same as with any windowing toolkit for the most part. I hate programming using non-typed languages myself, but there are tools where you can program in Java and compile to Javascript with HTML5 which is better than writing raw Javascript itself in most cases.

    Mono is also a charm. I haven't done anything cross platform with it yet, but .NET development is very nice to do. More because of the clean languages and incredible development environments than anything else. Windows.Forms is actually a pleasure to code for. The only real shortcoming of .NET is the string formatting functions which simply lack a simple model such as an sprintf() member. Instead, you have to use something like StringBuilder which is a mess.

    Qt on the other hand is an absolute wonder. I program Qt using both Visual Studio and Qt Creator and frankly, it's an absolute pleasure. For a means of writing cross platform code in C++, it's unmatched on any platform. You get full Visual Studio and Eclipse integration as well as Qt Creator as full IDE for free if you choose to use that.

    C and C++ (while being my favorite languages) are terrible languages and they're getting worse all the time. The standard C++ library is almost unusable, and therefore everyone spends there time rewriting the wheel over and over. C has diverged from C++ now and a lot of new C code coming out won't compile in C++ compilers. C++ has added a huge amount of new features to be abused in the latest standard.

    If you choose to use a C/C++ route, then Qt is certainly the best way to go as it has the most uniform programming model of any toolkit. By implementing signals and slots through a preprocessor, C/C++ not only gets something looking like C# style delegates, but also gains the ability to handle threading a little easier.

    Qt in reality is everything that the standard C++ library should have been.

    As to the GTK guys... well, it's nice and all, but it doesn't have any type of IDE integration. The documentation is poor on the best of days, non-existent on the others. When GTK+ needed an object model, someone reimplemented C++ using GObject which might be easy to use for some, but so far as I can tell simply implements something like COM in C using lots of macros. Not a day passes when I'm working on GTK+ that I don't wonder in marvel how much has been able to be written in a set of libraries that are so hard to use.

  107. Lazarus by cpt_koloth · · Score: 1

    have you considered Lazarus? It is cross platform and rather interesting.

  108. Qt by Anonymous Coward · · Score: 0

    Qt

  109. Lazarus ? by fredzouille · · Score: 1

    If you don't want to invest much time in learning GUI programming I think you'd better use an IDE rather than a GUI library.

    If you know a bit of Pascal language, Lazarus (Delphi clone) could be a good choice for example. It's lightweight, produces fast executables (compiled language) and is cross-platform (native GUI on MS Windows, GTK+ on Linux). It also provides a canvas with basic drawing functions, but you can still use OpenGL as a canvas for more complex (and faster) rendering.

    I think it's one of the best tools available to rapidely produce simple cross-platform applications.