Slashdot Mirror


Cross-Platform Development For Windows and OS X

An anonymous reader writes to let us know about an article in RegDeveloper detailing the use of Qt, Trolltech's cross-platform C++ toolkit, for development across Windows and Mac OS X. From the article: "QT not only goes across desktops but onto embedded devices as well. So any app you write with Qt will port to an embedded device with a frame buffer running Trolltech's embedded version of QT, called QtopiaCore."

30 of 198 comments (clear)

  1. wxWindows by also-rr · · Score: 5, Funny

    I have been doing cross platform development with wxWindows and I have to say it makes it easy. So far I have an application which crashes with exactly the same fault* on Windows, OSX *and* Linux! You just can't buy productivity like that with commercial development frameworks. *Error 5: Developer is an idiot who hasn't programmed much since the BBC Master was cutting edge technology.

    1. Re:wxWindows by EzInKy · · Score: 4, Insightful


      wxWidgets: supports more platforms and it is TRUE open source in that they don't charge you if you use it commercially. Enough said.


      No, it's really not enough said. If you want to get paid for your work then they should get paid for theirs.

      --
      Time is what keeps everything from happening all at once.
  2. Isn't that what YellowBox is for? by parvenu74 · · Score: 3, Interesting

    There are the persistent rumors that the YellowBox technology from NextSTEP is still alive and well on the Apple Campus, and is just waiting for The Steve to give the "And one more thing..." signal for it to come back into the light. But whom does that help, exactly?

    1. Re:Isn't that what YellowBox is for? by WillAdams · · Score: 2, Informative

      Well,there is GNUstep. http://www.gnustep.org/

      At least one commercial app for Mac OS X is using it to get a Windows version, Nova Mind:

      http://www.nova-mind.com/

      William
      (who is still pretty miffed that Apple had to cave in to Adobe and Microsoft et. al., so that instead of Rhapsody w/ Yellow Box, we got Mac OS X w/ Carbon --- I'd give my interest in Hell to get back all the time I've wasted at work using foetid Carbon apps)

      --
      Sphinx of black quartz, judge my vow.
  3. First things first by Anonymous Coward · · Score: 3, Informative

    Its Qt and not QT which means Quicktime.

    1. Re:First things first by enigma9 · · Score: 3, Funny
      It is QuickTime, not Quicktime.

      My pedantry is bigger than yours.

      --
      My other post is +5, Interesting
  4. well.. by ADRA · · Score: 3, Insightful

    I'll be the first to admit that I'm not very partial to QT, but the title of the article is horribly named. The title implies that the body encompases a general approach to cross-platform development. It doesn't. The article is about "Cross-platform QT development". More importantly, no alternatives are mentioned. The entire development piece is about using QT based technologies to tackel the cross-platform problem. All of this is well and great, but don't sell the article as -the- solution when its a very specific howto implement X for problem Y.

    --
    Bye!
  5. Better alternative by DraconPern · · Score: 3, Informative

    This is blatant slashvertisement. Qt's controls are all emulated, it's like using Java Swing when you can use SWT instead. Further more, it requires you to use non-standard c++ syntax together with a 'qt preprocessor'. The better choice is wxWidgets. It supports platforms, more compilers, has native controls, and it is open source.

    1. Re:Better alternative by molnarcs · · Score: 3, Informative
      The commercial license is a bit rediculous, though.

      Why? It seems pretty popular (Adobe, Skype, Google, Opera, etc..) Trolltech's modell is an excellent example of how you can make money on free software. QT - free for free software development, pay for it if you develop commercial software. Which means they have a good revenue stream to pay some of the best coders on earth to enhance QT, which in term, serves the community (being the basis of some of the best free software apps, like scribus for instance). Nice. (oh, and as a bonus, those who pay also get some of the best support services in the industry - check trolltech's customer satisfaction :))

    2. Re:Better alternative by Kjella · · Score: 4, Insightful

      This is blatant slashvertisement.

      For an OSS product. We seem to get a lot of those around here

      Qt's controls are all emulated, it's like using Java Swing when you can use SWT instead.

      Well, they don't look emulated or feel emulated, unlike java. But hey, I'm sure there's some technical reason you're right and noone cares.

      Further more, it requires you to use non-standard c++ syntax together with a 'qt preprocessor'.

      Yep. Which is what permits it to use a signal-slot mechanism which spanks wxWidgets and any other C++ system out there. No more crashes due to dangling pointers, yay!

      The better choice is wxWidgets. It supports platforms, more compilers, has native controls, and it is open source.

      Qt supports plenty platforms, plenty compilers, much better UI design tools and it's open source. I could mention it's a much better library too, but now you're just embarassing yourself.

      --
      Live today, because you never know what tomorrow brings
    3. Re:Better alternative by tonigonenstein · · Score: 3, Informative
      Yep. Which is what permits it to use a signal-slot mechanism which spanks wxWidgets and any other C++ system out there. No more crashes due to dangling pointers, yay!
      libsigc++ (used in gtkmm) gives you typesafe slots/signals in ISO C++, no need to invent your own language. (No granted this wasn't possible at the time QT was originally designed).
      --
      The sooner you fall behind, the more time you have to catch up.
    4. Re:Better alternative by molnarcs · · Score: 2, Insightful

      Still don't see your point - the price is determined by the market. If they can sell it for that much, and at the same time, they can be vastly more popular than wxWidgets (they have LOTS of customers, even though they provide a fully GPL version), that means that the pricing is just right, not ridiculous ;)) QT is simply so good, that people are willing to pay that much for it (and the support you get, which I heard is excellent).

    5. Re:Better alternative by J.R.+Random · · Score: 2, Informative

      Qt is not an "OSS product"; it's a commercial product that happens also to be released under an open source license. That's a big difference.

      QT is distributed under the GPL. That means it can be forked like any other GPLed software. As with any GPLed software, if you write software based upon it your own software must also be GPLed. Commercial users who don't want to GPL their code can buy licenses for the unfree version, since QT is dual licensed. This gives you more choices than you would have if it were only available under the GPL, yet strangely people who have no problem with GPLed software are always bitching about Trolltech's licensing options.

    6. Re:Better alternative by pherthyl · · Score: 2, Insightful

      One other thing. Toolkits like Qt and wxWidgets are complex beasts with lots of corner cases that can screw things up. It takes a lot of testing to get it right. That's another reason I choose Qt over wxWidgets. Qt gets hammered on by the KDE project all the time. Millions of lines of code and just about every type of app you can imagine. What is wxWidgets used in? I can only think of Audacity and VLC, neither of which has a particularly good UI.

    7. Re:Better alternative by kimvette · · Score: 2, Interesting
      yet strangely people who have no problem with GPLed software are always bitching about Trolltech's licensing options.


      . . . because the commercial version is unreasonably restricted. If you develop a project and release it under the GPL, and later decide to release it as a commercial app, you are forbidden to do so, or you have to reimplement the Qt components in your app. Honestly, I don't think ANYONE will abide by this and will simply just buy the commercial license, recompile, and release, but technically you are not allowed to do so.


      Trolltech Offers Both Commercial and Open Source Licenses

              * Trolltech's Commercial licenses allow customers to develop, use and distribute their applications under standard commercial terms.
              * Trolltech's Open Source versions are available under the terms of the GPL - General Public License. The main obligation for software development under the GPL is that anyone using your software must have access to complete source code, and must be able to modify and redistribute that software to anyone free of charge.
              * Please note that it is necessary to choose either the Open Source or Commercial license at the outset of development. Trolltech's commercial license terms do not allow you to start developing proprietary software using the Open Source edition.


      This, IMHO, is unreasonable. Obviously, their goal is to prevent a company from rolling out Qt to hundreds of developers' workstations, developing using the open source license, and then buying ONE seat for the release engineer to compile the final product. A very reasonable concern, of course, but their solution is unreasonable.

      A happy medium would be to simply require that one buy a seat of Qt per Qt developer prior to release of the commercial product. After all, folks ARE going to develop prototype code prior to choosing an API, and that prototype code may be retained in the final product. Also, some companies may choose to keep startup costs low by delaying the cost until later in the project, so that $2,000 per seat could be spent on better workstations, salaries, and whatnot, let capital reap interest, and THEN buy commercial licenses for the open-source libraries. They're not going to throw away prototype code.

      This is why you see more commerical Gtk apps than commercial Qt/KDE apps (despite GTK's annoying, retarded, fudged-up-for-simpletons file dialogs). GTK does not have this restriction, plus it's LGPL.
      --
      The Christian Right is Neither (Christian nor right). See: Matthew 23, Matthew 25, Ezekiel 16:48-50
  6. What about the GUIs? by Yvan256 · · Score: 2, Informative

    If you use these things, do the programs look native to the operating system or do they look like Java?

    I mean, one of the reason I don't use Firefox on OS X is because the form widgets look like crap (i.e. look like Windows).

    1. Re:What about the GUIs? by molnarcs · · Score: 3, Informative

      They work like native apps (check the comments below the article), and as far as I know, they can use native widgets as well. Skype and Opera are also written in QT (the interface) - do they look like native enough on windows or MacOS X? I've seen the windows versions of these only, they look like... well, windows programs (so consistency is not a problem, they just blend in fine the rest of the application stack on windows ;))

    2. Re:What about the GUIs? by Ruby+Wednesday · · Score: 2, Informative

      They use the native widgets. Aqua on OS X, and Luna (or whatever) on WinXP. (this is why these 2 themes only work on their respective platforms)

    3. Re:What about the GUIs? by Mercano · · Score: 4, Informative
      If you use these things, do the programs look native to the operating system or do they look like Java?
      Java apps should look like native apps, at least, if the developer thinks they should. Its not to hard. Either use AWT for your GUI which will use native widgets (though shoots for the least common denominator at times), or use swing and have it emulate native controls (more or less) by calling UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() ); early on in your code. Granted, neither is perfect, but they don't stick out like swings default (why?) Metal look and feel.
      --
      #include <signature.h>
  7. Re:And this is news? by 1iar_parad0x · · Score: 3, Informative

    It's not a news article, it's more of an overview for programmers. Actually, it's pretty well written, just not a 'headline'. Incidentally, I hadn't heard about the KDE/GNOME stuff until recently. I only ran across Qt when I was looking for an OSS (or just free) RAD tool.

    --
    What do you mean my sig is repetitive? What do you mean my sig is repetitive? What do you mean....
  8. Re:Don't Waste Unnecssary Resources by MightyMartian · · Score: 2, Interesting

    So I gather you guys sell Windows licenses as well, right? Or are you advocating your customers commit acts of piracy just because you're too cheap and/or incompetent to do a little leg work to recompile for OSX.

    --
    The world's burning. Moped Jesus spotted on I50. Details at 11.
  9. GNUstep by stivi · · Score: 2, Informative
    GNUstep

    • majority of Cocoa classes implemented
    • can use OS X NIB files (user interface)
    • uses Objective C - OS X "native" language
    • can be used on MS Windows, Linux or other systems with UNIX taste as well
    AFAIR, there was a project going on that will even convert your X Code files into GNUmakefiles that can be used directly on MS Windows, or at least someone was planning to do that. Contact the lists mentioned on their homepage for more information.

    See also: GNUstep and Cocoa

    --
    First they ignore you, then they laugh at you, then they fight you, then you win.
  10. Have a point by willy_me · · Score: 4, Interesting

    While everyone here appears to think that this is a troll, he actually has a point. Depending on the market it could be the best solution. However, if there is enough demand a competitor could release a MacOS version and steal your clients. And not just the MacOS clients. A company of say 100 with 2 Macs could decide to go with your competitor because of those two lousy Macs... Or a company thinking that someday they might want a Mac would have that much more incentive to avoid your product.

    I read a blog about the business decisions behind the upcoming Mac port of IBM Notes (or do they still call it Lotus Notes?) Anyway, the comment was that Macs make up only 1% of the market but carry 99% of the weight. (Probably a slight exaggeration on their part.) When I say weight I'm referring to making purchasing decisions. They're a very vocal group and the decision to make a *good* native version of Notes was not based on Mac numbers but on the influence that those few Mac users wielded. Moral of the story, don't dismiss Macs just because only a few of your clients have them.

    Willy

  11. Used it, loved it. by WPIDalamar · · Score: 2, Informative

    We used Qt for several rounds of development and it was always great to work with. In fact, I prefer their utility classes to the STL. Even if I was writing a single-platform project in c++ these days, I think I'd go for Qt.

    Nowadays we're using Flash for the win/osx cross platform development. Big things are starting to come in that front.

    Oh.. and Qt does use native (not emulated) widgets for win/osx.

  12. Re:And this is news? by ErroneousBee · · Score: 2, Funny

    He probably was referring to the KDE/Gnome flamewars that erupt on slashdot occassionaly. Evenyone knows those arguments are nonsense as Gnome is clearly inferior to KDE in every respect, apart from its gname.

    --
    **TODO** Steal someone elses sig.
  13. understand what you're getting into by oohshiny · · Score: 3, Insightful

    People like to say how wonderful Qt is, but you should think carefully about what you're getting into.

    Almost all of our projects are open source, but occasionally will do some custom commercial stuff. Yet, because the commercial version of Qt has a per developer license, we'd end up paying as much for it as if we did all closed-source development, since it would be impractical to divide our developers that way. And Qt isn't cheap: a couple of thousand dollars per developer. Think carefully about what it would cost you if you introduce Qt and start using it.

    An additional problem with it is that it (gratuitously) uses non-standard C++ extensions. That causes additional development headaches. And the Qt/Embedded version is not even fully compatible with the desktop version, and it's an all-or-nothing proposition (forget about using other toolkits on Qt/Embedded devices).

    Overall, I fail to see the point of Qt for most people. For cross-platform development needs, between Java, J2ME, and wxWidgets, I think all the bases are covered at lower licensing costs and (in the case of Java and J2ME) lower development and maintenance costs and better platform coverage.

  14. Re:Why use Qt? by Jerry · · Score: 2

    When I tried RealBasic 1.0 their demo tutorial produced code which crashed.
    IF they can't be sure their first release is reliable, what does that say about their quality control and testing?
    End of lesson. End of RB, for me.

    --

    Running with Linux for over 20 years!

  15. Re:And this is news? by Anonymous Coward · · Score: 2, Insightful

    You, sir, just made the most insightful post ever on this blog. I have long held the opinion that anyone who thinks Gnome is better than KDE is suffering from an almost-incurable mental illness and is thoroughly deranged. I once suffered from the mental illness known as "thinking Gnome is superior" but I have since switched to KDE and got cured.

    If you are a Gnome user, have no fear. The cure of your illness does not hurt. Simply install KDE, and don't worry, as long as you keep your Gtk libraries around, all those wonderful Gnome apps will still run. Granted, you will still suffer from brain-dead file dialogs designed for people with all of the intelligence of mucous, but you will be well on your way toward stable mental health.

  16. Re:TrollTech at SCALE 5x by socallinuxexpo.org · · Score: 2, Informative

    Use the promo code "SLASH" for 40% off on registration.

  17. ... and wyoGuide by wysiwia · · Score: 2, Informative

    Easy cross-platform development can be learned at wyoGuide (http://wyoguide.sf.net/). If you are serious and considers to sell your software anytimes in the future, there's no better choice.

    If you know that one of the top inhibitors of Linux desktop adoption is applications (see http://www.osdl.org/dtl/DTL_Survey_Report_Nov2005. pdf), you would wish that more developers would follow wyoGuide.

    O. Wyss

    --
    See http://wyoguide.sf.net/papers/Cross-platform.html