Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
GUI Software KDE

A Taste of Qt 4 365

Karma Sucks writes "In 'A Taste of Qt 4', Trolltech reveals that it is positioning Qt 4 directly against Java. Qt 4 promises to be smaller and faster than its predecessors and there will be a boatload of new features including support for non-GUI applications and accessibility under Linux using Sun's ATK. More controversial is the introduction of a new and elegant foreach construct. Incidentally, for those still opposed to Qt's moc preprocessor, Havoc has some interesting comments. It is possible the idea will be adapted to provide GObject introspection in the future."
This discussion has been archived. No new comments can be posted.

A Taste of Qt 4

Comments Filter:
  • Mono-Culture? (Score:5, Interesting)

    by Anonymous Coward on Monday April 19, 2004 @02:05AM (#8901828)
    "Trolltech reveals that it is positioning Qt 4 directly against Java."

    And what about Mono?
    • Re:Mono-Culture? (Score:4, Insightful)

      by bircho ( 559727 ) on Monday April 19, 2004 @02:51AM (#8902031)

      It's not a Monopoly... I don't think Gnome is gonna embrace Qt (at least now). So Mono has its place.

    • Re:Mono-Culture? (Score:4, Insightful)

      by RoLi ( 141856 ) on Monday April 19, 2004 @04:26AM (#8902299)
      Is there even one single non-trivial software project made with/on Mono?

      I'm getting tired of all those predictions, promises and vaporware coming from Gnome/Mono. Why does anybody still take them seriously?

      So far, nothing useful has come from Mono while Qt runs REAL software (you know, the kind that actually runs and can be useful) ranging from a whole desktop environment to word-processors.

      • Re:Mono-Culture? (Score:3, Insightful)

        by nuba ( 660398 )
        My thought is that this has more to do with critical mass than it has to do with any technical merits of mono. Don't bash mono just because we're not ready to use it, when the time comes that some people begin to need/want it we'll be glad that its mature enough to go head to head with the closed alternatives.
      • Re:Mono-Culture? (Score:3, Interesting)

        by RPoet ( 20693 )
        Depending on your take on "non-trivial", there are several projects built with mono and C#: Muine [gooeylinux.org], the music player and F-Spot [gnome.org] the personal photo manager, off the top of my mind.

        The point is just that Mono is not a toy. Of course, it's not silver bullet either, but compared to C, it sure allows the developer to focus on the important logic of his applications instead of juggling with memory pointers.
      • Re:Mono-Culture? (Score:4, Informative)

        by Hard_Code ( 49548 ) on Monday April 19, 2004 @10:36AM (#8904096)
        "Is there even one single non-trivial software project made with/on Mono?"

        Given that Mono runs C#... just survey the landscape of .NET/CLR/C# apps and find out yourself.

        Eclipse (one of the most popular [Java] developement environments) for one has been compiled to CLR bytecode and run on Mono. There is also an ASP engine written on Mono. Go check out the Mono site to see who use it. There are several companies that use it as a production environment.
  • About KDE... (Score:5, Interesting)

    by c4Ff3In3 4ddiC+ ( 661808 ) on Monday April 19, 2004 @02:09AM (#8901859)
    When KDE released version 3.2, there was a noticable speed improvment for most users. Will we get to see another good speed boost when/if KDE moves to QT4? Here's hoping.
    • Re:About KDE... (Score:5, Informative)

      by 10Ghz ( 453478 ) on Monday April 19, 2004 @02:33AM (#8901965)
      I would say yes. There has been lots of talks in the KDE-community to keep on optimizing the code. And Qt4 has several improvements that boost performance in the toolkit-side. So the toolkit gets a significant performance-boost with Qt4, and KDE itself gets more and more performance through optimizations in the code.

      Qt4 alone should cut down the start-up time of apps significantly. It's effect in the run-time are propably less dramatic, but the KDE-folks can make a difference there (and they are making a difference). And Qt4 should eat considerably less RAM. I see good things ahead :).
  • Trolltech (Score:5, Funny)

    by Anonymous Coward on Monday April 19, 2004 @02:13AM (#8901874)
    Ain't it neat how the trolls have their own tech company?
  • Psh... (Score:4, Funny)

    by Anonymous Coward on Monday April 19, 2004 @02:13AM (#8901879)
    qt 6.5 [apple.com] has been out for a while now.
  • by obsidianpreacher ( 316585 ) on Monday April 19, 2004 @02:19AM (#8901902)
    I thought we had come to the conclusion that since Sun "sold out" to Microsoft, that Java was therefore "dead" ... didn't we? And now these guys come along and ... wait ... Trolltech ...?

    Nevermind, it makes sense now.
  • Java? (Score:5, Insightful)

    by bunhed ( 208100 ) on Monday April 19, 2004 @02:21AM (#8901907)
    ..."positioning Qt 4 directly against Java"?

    That'll be great to be writing servlets and jsp's in C++. *cough*

    • Re:Java? (Score:5, Interesting)

      by moro_666 ( 414422 ) <kulminaator@gmai ... Nom minus author> on Monday April 19, 2004 @02:39AM (#8901992) Homepage
      excuse me for the following expression :
      qt vs java ? WTF ?
      this is like comparing a ford vs. titanic.
      java is much more than some simple thread/socket apis
      and visual components.

      java has technologies from j2me to j2ee including
      huge transactioning clusters which work with thousands
      of clients. show me an qt based application server like jboss.
      there are none.

      so how could you POSSIBLY compare these things ?

      java runs anywhere from sun to x86, you don't have to
      compile anything if you switch the platform.

      with qt you have to. that's the trouble most users don't want to take.

      java can work in a cluster where machines are ranged
      x86's to ultrasparcs and Apple's G4's. Qt isn't able
      to do it. so .. what's the case ?

      it's hard to write a memory leaking application in java
      (i know it can be done, i have seen some "java programmers"
      who are experts on it, but usually it doesn't happen),
      every forgotten free() or a typo in a c/c++ program can
      cause you memory leaks.
      it's very hard to get a segmentation fault in java, in the
      opposite of that you get a catchable exception which
      you can handle as you like, as in c i belive everyone
      reading this forum has opened the bloody gdb and looked
      "where the f do i go wrong here... ?".

      gush. who ever wrote the article should be ashamed a bit.
      there is absolutely no point in the whole thing whatsoever.

      you may define one define that qt the standard of c++ as
      j2sdk is for java, but you couldn't obviously compare a c++
      library to the whole java business.
      • Re:Java? (Score:2, Insightful)

        by master_p ( 608214 )

        qt vs java ? WTF ? this is like comparing a ford vs. titanic. java is much more than some simple thread/socket apis and visual components.

        When they say Qt vs Java, they mean API vs API. There is no other meaning, since Java is also a platform, whereas Qt is a toolkit.

        Java is mainly a toolkit, and you also get an environment to run the toolkit inside. This is not a bad thing, but it does not provoke economy. C++ based apps are compiled once, Java apps are compiled every time they run.

        To prove to you

        • Re:Java? (Score:4, Insightful)

          by Viol8 ( 599362 ) on Monday April 19, 2004 @07:22AM (#8902790) Homepage
          "C++ does not have 'free'."

          Yes it does , you can use the full C API in C++ and for simple things it used to be quicker though I don't think thats the case any longer.

          "If you use C++ properly, you shall not have memory leaks"

          You could say the same about C or even assembler. If an object is new'd in a function but the coder forgets to delete it thats a memory leak,
          exactly the same as doing a malloc but forgetting the free.

          "Maybe you should be ashamed, because you have no idea of C++ programming."

          I'm not convinced you have a full handle on it either. I get the feeling you learnt C++ and never learnt straight C which you may think is an advantage
          but I can assure you it isn't.
          • Re:Java? (Score:3, Insightful)

            Perhaps he is corect.. The free() function just deallocates memory, delete does a whole lot more AFAIK, calling destructors and the like.

            While I agree that C++ can be as dangerous as Assembler, use of proper libraries/STL does improve the situation.

    • Re:Java? (Score:2, Interesting)

      by bircho ( 559727 )

      A friend of mine has some work in this area... Server-side programming in C++...T++ [sourceforge.net] are not very useble yet, but proof it could be done.

  • by infiniti99 ( 219973 ) <justin@affinix.com> on Monday April 19, 2004 @02:28AM (#8901946) Homepage
    In the Linux world, Qt is often thought of as just a GUI toolkit. After all, there is no look-and-feel standard in the X11 environment, and by default Qt and Gtk look much different. Therefore, most look-and-feel decisions on the X11 platform amount to selecting between the toolkits. Consider PyQt, which provides GUI support to python via Qt, but nothing more.

    What people don't realize is that Qt is actually a massive foundational library, similar in nature to Java's, for C++. It is a very large API, with threading, network, XML, objects, container classes, string handling, unicode, etc. The 'moc' tool even brings extra features to C++ that normally don't exist. It's almost as if Qt/C++ is a language of its own. GUI is a very small portion of Qt. In fact, of all the Qt code I've ever written, most of it has nothing to do with the GUI. Qt makes C++ actually fun.

    I'm very much looking forward to Qt 4. With the plans for advanced threading support and GUI/non-GUI split (similar to how glib and gtk are separated), I can see Qt being very useful for writing cross-platform server applications, a market mostly ruled by Java. The great thing about Qt is that it gives us natively compiled code.
    • by dcuny ( 613699 ) on Monday April 19, 2004 @02:45AM (#8902010)
      What people don't realize is that Qt is actually a massive foundational library...

      Yes, a lot like wxWidgets. [wxwidgets.org]

    • by osewa77 ( 603622 ) <naijasms@gma[ ]com ['il.' in gap]> on Monday April 19, 2004 @02:49AM (#8902026) Homepage
      For server-side programming, they'll need their own sort of Servlet API _or_ at least something that connects to Apache (see mod_cpp [selfsoft.com]). There are conceivable ways to implement memory protection for such C++ Servlets, e.g. running each separate Servlet as it's own multithreaded application (another name for SpeedyCGI?)
    • Yeah, BUT.... (Score:4, Insightful)

      by SerpentMage ( 13390 ) on Monday April 19, 2004 @02:55AM (#8902046)
      Sounds interesting, BUT.... The problem QT are as follows:

      1) No GPL version for the Windows platform. As much as people in the Open Source community might hate MS, many (most) Open Source packages are cross-platform where Windows is a platform.

      2) A non GPL version of the library costs an outrageous sum of money. Sure Trolltech wants to make money, but lower the costs a bit.

      3) Why compete against Java? Somebody who uses Java is not going to switch to Qt as Java is still simpler. To me C++ != Java, and I am not saying one is better or worse than the other.

      Frankly, I tend to prefer wxWindows, which has many of facilities mentioned in the parent post. And there are plenty of bindings for wxWindows (Python, Java, .NET, etc)

      • No GPL version for Windows makes it impractical for a lot of cross-platform applications. Gaim, for example, uses GTK for both its Linux and Windows versions, but this would be impossible to do with Qt.
        • by infiniti99 ( 219973 ) <justin@affinix.com> on Monday April 19, 2004 @06:24AM (#8902623) Homepage
          Yes, this is an unfortunate problem. The main reason there is no GPL version for Windows is that 99% of all software developed is in-house, and the GPL would allow in-house development without needing a commercial license (this would seriously eat into Trolltech's income). The company has tried in the past to release a "non-commercial" edition, which was closed source, but free to use, provided it was not for commercial purposes. Unfortunately this was abused by organizations who used it for commercial purposes anyway.

          I should mention that the Psi project [affinix.com] receives Qt/Windows for free. Trolltech gave us several commercial licenses, including endless support and upgrades, provided that we only use it for open source work. I'm not sure how practical it is for all free cross-platform projects to establish a trusting relationship with Trolltech in order to use Qt/Windows, but it might be a solution...
          • I'm not sure how practical it is for all free cross-platform projects to establish a trusting relationship with Trolltech in order to use Qt/Windows, but it might be a solution...

            If a developer got a Qt/Win commercial license, can he/shethen compile an open source program and distribute the binary? I checked the license agreement for Qt/Win and didn't find anything about that...

            • If a developer got a Qt/Win commercial license, can he/shethen compile an open source program and distribute the binary? I checked the license agreement for Qt/Win and didn't find anything about that...

              Yes, this is allowed. Back when Qt/Mac was still non-free, I found a commercial user on the qt-interest mailinglist to maintain my Mac port. Just ensure that the person doing the compiling has the necessary rights to do so. For GPL projects, this generally means amending the license to allow linking to t
            • No problems with that, in fact, some Trolltech employees themselves used to do that for open source software that needed to a quick port to Windows.
      • Re:Yeah, BUT.... (Score:5, Insightful)

        by infiniti99 ( 219973 ) <justin@affinix.com> on Monday April 19, 2004 @06:05AM (#8902560) Homepage
        1) No GPL version for the Windows platform. As much as people in the Open Source community might hate MS, many (most) Open Source packages are cross-platform where Windows is a platform.

        A port of the GPL'd Qt/X11 to Windows can be found here [sourceforge.net]. Remember, there was a time when Gtk didn't run anywhere but X11 either, yet hobbyists managed to port it. Qt is arguably much easier to port, as it was designed this way, and Trolltech has already proven it with their own proprietary version.

        2) A non GPL version of the library costs an outrageous sum of money. Sure Trolltech wants to make money, but lower the costs a bit.

        Honestly, I'm not sure how Trolltech can afford to pay all of their programmers a decent wage by simply selling a developer tool (which by definition is a bit of a niche market), even at such a high price. They must sell a heap of licenses... I'm no business major, but I think that Qt has to be expensive if we want Trolltech in business (and we do, Linux on the desktop wouldn't be where it is today without 'em).

        3) Why compete against Java? Somebody who uses Java is not going to switch to Qt as Java is still simpler. To me C++ != Java, and I am not saying one is better or worse than the other.

        Ahh, but maybe Qt can keep a C++ user from switching to Java? I learned Qt before I learned Java, and during my study of the latter I kept thinking how much it was like Qt. At this stage, if something cool is possible in Java, I'd like to see it also possible in Qt/C++ (assuming such a feature would make sense in that context).
        • "A port of the GPL'd Qt/X11 to Windows can be found here."

          Thanks for the link. I had no idea such a port was so far along. As a former Qt licensee (my workplace bought the license, but can't justify the cost of continuing to do so) who writes only in-house software, this is incredibly good news.
          • As a former tinkerer in that port, I'll have to say that it is about 80% of Qt is ported, but that other missing 20% creates problems with many real life apps. The other problem is that there aren't any active developers for a few months. So if you any Qt and/or win32 experience, and have never looked at Qt/Win's source code, sign up! [kde.org]
      • Re:Yeah, BUT.... (Score:4, Interesting)

        by StormReaver ( 59959 ) on Monday April 19, 2004 @07:23AM (#8902793)
        "Somebody who uses Java is not going to switch to Qt as Java is still simpler."

        I wrote Java GUI applications for a few years before having been exposed to C++ (much less Qt). I learned C++ solely so I could use GTK--.

        A year later, I found Qt and found myself using it more than I used Java (I had since become disillusioned with GTK--).

        Today, I only write Java code if I would otherwise be stuck writing VB. In all other cases, I write C++ with Qt.
      • Trolling? (Score:5, Insightful)

        by brunes69 ( 86786 ) <[slashdot] [at] [keirstead.org]> on Monday April 19, 2004 @07:40AM (#8902855)

        2) A non GPL version of the library costs an outrageous sum of money.

        If you think only 1500-3000 [trolltech.com] ( depending on package ) per developer for a perpetual license is a large amount of money, then you're either 12 years old or have never paid a dime for software in your life.

        A manager of any team of 5 or more people would laugh at that kind of money. It is chump change compared to how much a company would spend on *paper* for pete's sake.

        And if you take into account the developer's time ( which any manager must ), Qt is actually cheaper since it is so powerfull it takes on average 25-50% less code to do things in Qt than it does to do in other C++ toolkits I have used in the past.

        I would use Qt even if I was only targeting Windows and even if I was the only person on the team. It is *that* good. People who knock it just do not have experience using it.

    • by HuguesT ( 84078 ) on Monday April 19, 2004 @02:57AM (#8902055)
      Honest question, not flame.

      I read a comment in Doctor Dobbs' Journal more than a year ago to the effect that Qt doesn't teach good C++ practices because most, but not all, objects are managed by the toolkit, in such a way that they must be allocated but never released. People do lots of new() but never any delete().

      Is that true?
      • by Yokaze ( 70883 ) on Monday April 19, 2004 @03:16AM (#8902123)
        Only objects derived from QObject and added as a child to another QObject are deleteted automatically on destruction of the parent. (See QObject [trolltech.com])

        This means that one doesn't have to delete all widgets which are added to a parent widgets by hand, but that it happens through the ownership-tree when deleteing the parent widget.

        I don't feel qualified to play judge between DDJ and Trolltech on wether that is good or bad C++ practice.

        • by julesh ( 229690 ) on Monday April 19, 2004 @06:06AM (#8902567)
          You could argue that COM teaches bad practice because you never explicitly deallocate a COM object. You just call unlock() on it.

          Perhaps using a garbage collector is bad practice, too. We should probably therefore stay away from any project like Boehm GC that provides garbage collection in C and C++.

          Or maybe automatic ways of managing object destruction are useful tools that make programming easier... I wonder which?
        • "I don't feel qualified to play judge between DDJ and Trolltech on wether that is good or bad C++ practice."

          Like all language features, whether Qt's automatic object deletion is good or bad depends entirely on the programmer taking advantage of the feature (or failing to take advantage of it).

          I think it's a great feature. It proves its usefulness each time I create a non-trivial user interface.

          I use QPtrList (the class which does the behind-the-scenes auto-deletion) extensively in my non-GUI classes jus
      • I haven't used qt any more than for some simple Hello world, stuff, but IMHO that argument is quite poor. Qt sucks because it makes life easier? Umm, why not do your GUI programming in asm while you're at it, if you like pain?

        The same argument could of course equally poorly be made against smart pointers. Why use a smart pointer when you could do manual memory management with new and delete? Oh, what heresy!

        PS. new and delete are operators, not functions. There is no such thing as new() and delete().
        • Unfortunately I don't have access to the original article anymore. I seem to remember that the point was that sure it simplifies things a great deal in the context of the QT object, but that later the same developers are likely to forget to delete what they've allocated in a different context.

          From memory the author advocates a syntax that makes it clear that the pointer is managed (à la smart pointer) or to provide a method that clearly deletes something (as in widget.deleteAllChildren() maybe?).

          And
          • And yes new() and delete() do exist, sorry.

            I stand by my claim: new() and delete() don't exist in standard C++.

            Yes, of course new and delete can be overloaded, just like other OPERATORS. And yes, overloading happens to be done with methods having a special signature, in the case of new the method name happens to be "operatornew". Because the "operator" word is reserved in C++, you often see the new operator overloaded as

            void* operator new(std::size_t) throw (std::bad_alloc);

            to improve readabi

    • by vivek7006 ( 585218 ) on Monday April 19, 2004 @03:05AM (#8902086) Homepage
      You are right. QT is more than just a GUI. QT XML Module provides a very neat XML solution (both DOM and SAX), but unfortunately their implementation is really slow [sourceforge.net]
  • by tealover ( 187148 ) on Monday April 19, 2004 @02:39AM (#8901991)
    a. More controversial is the introduction of a new and elegant foreach construct.

    b. VB has a foreach construct.

    c. Therefore, VB is elegant ?
    • by Idaho ( 12907 ) on Monday April 19, 2004 @06:22AM (#8902617)

      a. More controversial is the introduction of a new and elegant foreach construct.
      b. VB has a foreach construct.
      c. Therefore, VB is elegant ?


      Yeah, and using the same type of logic:

      a. Human beings have hair
      b. Cats have hair
      c. Therefore, cats are human beings.

      See, I knew it! Your cat owns you, and not the other way round! (or is that only the case in Soviet Russia?)
  • by tree_frog ( 113005 ) on Monday April 19, 2004 @02:40AM (#8901993)
    A Qt widget set target against the Parrot virtual machine would be lovely.

    Just think. .Net has well, all that Windows stuff (I'm not a big windows graphics programmer)
    Java has Swing / Eclipse and the old one whose name I can't remember but I did use it a lot but its 7:30am and the coffee hasn't hit me yet.
    A Parrot/Qt set would give Perl, Python, Ruby etc a nice graphics toolkit targettable against multiple platforms. Yes I know about Tk/Tcl and WxWindows.

    Uurgh. Must get coffee. And train

    regards, treefrog
    • *cough* GTK *cough*

      I'm just saying you left it out, not trying to start the holy war. In keeping with that goal, I'll offend both sides in one of the other well known battles and openly tell the world... I prefer nano

    • No reason why not. There are already Perl and Python bindings for Qt (PerlQt and PyQt), as well as Ruby and Java bindings. Dropping it down to the Parrot level does make some sense (use a subclassed PyQt object from Perl, say?)
    • QT can't be the part of parrot because of the C++ compiler requirement (To be able to run on 100 different platforms, only a C compiler (and perl 5) is required to compile parrot), but an external QT module would be very useful.

  • by PissingInTheWind ( 573929 ) on Monday April 19, 2004 @03:00AM (#8902068)
    Wow, a new syntactic construct. Stop the press.

    Seriously, such rejoicing about new language features fills me with pity at the thought of those poor programmers stuck with whatever language constructs the "higher autorities" deems them worthy to have.

    Lisp has supported extending the language for about 40 years. And people still get excited when they get a new syntactic construct for C++. That is sad.

    If you want to find joy and productivity in programming, use Scheme, Common Lisp or some other programmable programming language. Free your mind.
    • by Anonymous Coward
      As a Lisp advocate, your name is entirely appropriate.
    • by jbrandon ( 603700 ) on Monday April 19, 2004 @03:47AM (#8902203)
      If you want to find joy and productivity in programming, use Scheme, Common Lisp . . .

      I would, but runtime type errors keep me up at night.

      . . . or some other programmable programming language.

      I'm still looking for one with static types.

      • I'm still looking for one with static types.

        How about this one [inria.fr]? (For the "programmable" bit, see here [inria.fr].)

        Here's Qt's new 'foreach' construct:

        foreach (element, list)
        process (element);

        Here's the equivalent code in Lisp:

        (foreach element list
        (process element))

        And here it is in OCaml:

        List.iter process list

        • by Sunnan ( 466558 )
          The code in scheme is:

          (for-each process list)

          and in CL

          (mapc process list)

          In CL you may want to use the function cell:

          (mapc #'process list)

          It depends on what type of process it is.
    • Perhaps this is because, Lisp, unlike so many other languages, has only one (effectively, anyway) syntactic construct, the list?

      Since the distinction between built-in and non-built-in functions does not exist, 'extension' of the language is trivial. (I use 'extension' a bit liberally here.)
  • foreach (Score:5, Insightful)

    by Bingo Foo ( 179380 ) on Monday April 19, 2004 @03:01AM (#8902076)
    If you use a c++ compiler with "typeof" (g++ has this) and STL containers, you can do this handy trick:
    #define EACH( I , C ) typeof((C).begin()) (I) = (C).begin();\
    (I) != (C).end(); ++(I)
    that allows:
    std::vector<MyBigClass> v = ...

    for ( EACH( i, v ) ) {
    ... do something with i ...
    }
    which is very readable and maintainable. My guess is that Qt's foreach is something similar:
    #define foreach( I , C ) for ( typeof((C).begin()) (I) = (C).begin();\
    (I) != (C).end(); ++(I) )

    foreach( i, v ) {
    ... do something with i ...
    }
    The problem is that this is too much of a departure from C++ syntax (foiling editor syntax highlighting), and the macro hides too much of the actual loop construct.

    • std::for_each (Score:2, Interesting)

      by jhurani ( 750697 )
      http://www.sgi.com/tech/stl/for_each.html would do the trick (and would help in avoiding a large body for for-loop).
      • Re:std::for_each (Score:4, Insightful)

        by Bingo Foo ( 179380 ) on Monday April 19, 2004 @03:28AM (#8902153)
        This would not "do the trick" for me. The STL for_each requires a pre-defined functor outside the scope where the for_each pseudoloop algorithm is executed. I like the perlness of a "for each" that acts like a natural extension to the for loop.

  • by JessLeah ( 625838 ) on Monday April 19, 2004 @03:38AM (#8902178)
    Already, Java is being threatened by Microsoft (for obvious reasons) and by Sun themselves (for almost-as-obvious reasons-- i.e. Sun getting into bed with Microsoft). Remember that the software field does not look like "Microsoft versus Sun versus Apple versus...." at present. Rather, it looks like "Microsoft versus everybody else.."

    Until the marketplace is more open, with no gigantic 95+% monopolies in any given field, I'd like to see the non-Microsoft players cooperate in an effort to cut MS down to size. Then, and only then, should they focus on competing amongst themselves!
  • ...that will make Things better. What is it, that everybody is trying to discredit java, by just copying fundamental features of the Language, or API or VM? .NET and QT are just the big players here. I don't know whats wrong with these folks.
  • by henrypijames ( 669281 ) on Monday April 19, 2004 @03:58AM (#8902228) Homepage

    So Qt 4 is "positioned directly against Java". Fantastic! Except I read just a few days ago (also here on slashdot) that Qt will keep on blockading the release of a free-of-charge and publicly available version of their Win32 library port.

    Now, call me cynical, but how in the hell are you gonna compete with Java, whose foremost strength is the (alleged) platform independency if you kill yourself right away for the most commonly used platform?

    As pointed out by many readers already, Mac OS X is not free or Open Source, and does not have a statistically proven larger base of FOSS developers. So offering free Qt library for OS X while categorically denying Win32 is nothing but complete BS. And this new PR crap about "positioning against Java" is simply too laughable seen in this light.

    Btw, I prefer KDE over Gnome, so I'm not an "enemy" of Qt per se.

    • by master_p ( 608214 ) on Monday April 19, 2004 @06:47AM (#8902683)

      Now, call me cynical, but how in the hell are you gonna compete with Java, whose foremost strength is the (alleged) platform independency if you kill yourself right away for the most commonly used platform?

      What does platform independency have to do with openness ? if you pay Trolltech, you get the Win32 sources. Qt is open (as in speech)

      Why does everything have to be free (as in beer) ? if you made good software, woudn't you want to get something in return ?

      Sun has a specific reason that Java is free (as in beer): market penetration. On the other hand, Trolltech is just a small company, very small compared to Sun. They can't afford to give away for free their flagship (and only) product.

    • > So offering free Qt library for OS X while categorically denying Win32 is nothing but complete BS.

      I agree, but pragmatically speaking, Trolltech would probably go out of buisness if Qt for Windows was freed.

      I'd like to see that NOT happen.
  • Driven by consumer electronic devices such as mobile phones and PDAs, desktop applications are moving away from standard widgets and styles towards more customized user interfaces. Qt 4 will support this modern user interface approach through its powerful style system as well as with flicker-free refreshes and transparency for all built-in and custom widgets.

    I find this trend distressing. Custom user interfaces are, in general, a bad idea. Using non-standard widgets impacts negatively upon application u

  • foreach, like this? (Score:2, Informative)

    by catf00d ( 451699 )
    I wonder if it's anything like the foreach macro I wrote and proposed for inclusion in the Boost library. Slides and source code available from here. [nwcpp.org]
  • by tyrione ( 134248 ) on Monday April 19, 2004 @04:44AM (#8902329) Homepage

    For most people who were in the pre-DotCom Boom you will recall that WebObjects via Objective-C really paved the way for Web Server-Side Development.

    The decision to switch it to J2EE was political and at the time, necessary, in order to compete with all the hype.

    Remember however, that this "CODE" wasn't washed down the drain. WebObjects leveraged Foundation and AppKit directly. The beauty of Cocoa is that augmenting WebObjects back to Cocoa/Objective-C is extremely trival for Apple.

    I would be highly surprised if Steve doesn't decide to throw out the trump with Portable Distributed Objects (PDO) for say OS X version 11 and have it seemlessly work with .NET and J2EE.

    What a lot of people who also worked once at NeXT know is that lots of the technologies that were never released are slowly being reincarnated into various pieces of the pie.

  • Against Java ? (Score:5, Insightful)

    by MosesJones ( 55544 ) on Monday April 19, 2004 @05:00AM (#8902373) Homepage

    Which bit ?

    Against the J2EE platform supported by IBM, SAP, PeopleSoft, Oracle, BEA, Sun, Manugistics etc etc

    Against J2SE supported by IBM, Sun, Dell, HP etc

    Against J2ME supported by IBM, Nokia, Ericsson, Sony, Sun etc

    How about positioning it as a useful tool for corporate developers with minimal tooling support and no easy integration with corporate applications.

    OSS needs to realise what WORKS in a corporate environment and why it does, and why re-inventing, or competing with, the wheel is not a great idea.

    I like OSS, I advocate OSS with my clients, but its this sort of visionless statement that makes many serious IT directors walk away as they know its a bollocks statement made by people without a grasp of their problems.

    Corporate IT _is_ IT.
  • NAtive Toolkit? (Score:2, Interesting)

    by Daengbo ( 523424 )
    On Linux, Qt is in the unique position of being seen as one of the native APIs.
    I thought that honor belonged solely to Motif...
  • Qt vs Java/Swing (Score:5, Interesting)

    by nikster ( 462799 ) on Monday April 19, 2004 @06:00AM (#8902547) Homepage
    First, we need to clear up the confustion from the following statement:
    "Qt is positioned as superior alternative to Java".

    Trolltech cannot possibly mean that. What they meant to say is: "Qt is an alternative to Java when it comes to cross platform client applications using a GUI". While Qt may do some non-GUI things, too, it's totally different from Java (clue: Qt is not a programming language) and from the Java platform (it doesn't come with a VM, it doesn't have its own bytecode, etc...). What remains is that it's an alternative to Java if you want to deploy applications across Windows, Mac, and Linux. Giving Trolltech the benefit of doubt, this is what they meant.

    Having done client-side programming for many years, i can see that there is something to that. I once hoped that Qt would develop into a viable alternative because AWT/Swing was so slow.

    However, since then Sun has done their homework and made Swing fast (indistinguishable from native, for the most part), and they are continuing to work on performance in release 1.5. There is still a lot of room for improvement. Things like Apple's library caching - where they pre-compile the native libraries and cache the machine code on the hard disk which makes a Java apps start as fast as a native apps, more hardware acceleration for Swing etc.

    Once we get performance out of the way (i have not seen Qt, but i assume it's fast), there is nothing Qt could offer that Java didn't do better.
    For example, you don't have to deal with c++. Java is not perfect, but it's - yes we can say that in public - definitely more productive than c++, in the same way that c++ is more productive than asm machine code.
    Add to that extensive networking libraries, array bounds checking (buffer overflow exploits not possible in java, imagine that), garbage collection, serious instead of optional OO, and the list could go on and on, no recompiling, runs on more platforms than Qt, free deploy license...
    • Re:Qt vs Java/Swing (Score:4, Informative)

      by StormReaver ( 59959 ) on Monday April 19, 2004 @07:38AM (#8902850)
      "Java is not perfect, but it's - yes we can say that in public - definitely more productive than c++"

      I've been programming in Java and C++ for years, and in Java for years before learning C++. My productivity with Qt/C++ equals (and in most cases, exceeds) my productivity with Java.

      While Swing on the Mac may have dramatically improved its performance (I'll have to take your word for it), Swing on Linux and Windows are still (as of JDK 1.4x) horrendously slow to start and horrendously slow to run.

      Qt outperforms Java/Swing by a huge margin on those platforms.
  • by Meijer ( 237978 ) on Monday April 19, 2004 @06:44AM (#8902673)
    For me, the extended support for multithreading is the biggest deal.
    Qt 4 takes threading support to another level, with per-thread event loops, signals--slots connections across threads, and thread-safe implicit data sharing.
    If I am not mistaken, this will enable slots to serve as messages in message passing concurrency [c2.com].
    But how will they make shared data thread-safe implicitly!? Usually, for MPC, data is just copied. But if different threads share pointers, the access must be synchronized. Will QObjects become Monitors, like Java's Objects?

To do nothing is to be nothing.

Working...