Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Qt 5.0 Released

Unknown Lamer posted about 2 years ago | from the half-of-common-lisp dept.

Open Source 161

sfcrazy writes "The Qt project and Digia, the company behind Qt framework, have released the most awaited C++ framework for developers, Qt 5.0. The company claims it's one of the best releases to date and has invested a significant amount of time behind this release. It's an overhaul of the Qt 4.x series and makes Qt fit for the future." Update: 12/19 17:46 GMT by U L : Major new features include an overhauled graphics layer, full integration of Qt Quick for creating flexible interfaces using Javascript, and increased modularization including the first steps toward de-emphasizing QtWidgets by separating them into their own module.

Sorry! There are no comments related to the filter you selected.

Hmm (0)

LizardKing (5245) | about 2 years ago | (#42337737)

The company claims that it's one of the best releases till date

Well, you would rather hope so.

Says you! (-1)

Anonymous Coward | about 2 years ago | (#42337875)

The company claims that it's one of the best releases till date

Well, you would rather hope so.

No. What they should do, is release complete shit - like MS with Vista. Then on the next release, make THAT one better than everything else - like WIndows 7 - and make a shit load of money on folks who desperately need to "upgrade". Then after that release shit again - like Windows 8.

Then...well, you get the drift ...

How? (-1)

Anonymous Coward | about 2 years ago | (#42337757)

How is Qt still relevant?

I use it so it's relevant to me. (1)

Anonymous Coward | about 2 years ago | (#42337835)

It's mature and has all the bells and whistles. Only other alternative is WxWidgets...

What else did you have in mind ?

Re:I use it so it's relevant to me. (2, Insightful)

Anonymous Coward | about 2 years ago | (#42338197)

He probably means that because the brain damage management at Nokia couldn't get it going on a phone that it's doomed. Android and Apple won and if you buy into the "Desktop is Dead" idiocy then you think that mobile is the only target that matters. We won't tell the fuck head that 9 out of 10 times those "Desktop is Dead" articles are viewed from a desktop. It's confusing to them. No those are real numbers. Go look at all the sites you use to decide who's winning the browser war. They may disagree on which one is the absolute victor but they all agree that mobile browsers only account for about 10% of the total market. (Hint people are buying mobile phones because they are mobile phones more than because they come with a browser that will drive your data plan into ob$cenity. Almost no one but the hard core geek uses their mobile browser as much as the voice or texting services they purchased the phone for in the first place.)

Now if you don't buy into the hoopla and realize that the desktop isn't dieing then Qt is relevant, useful, alive and kicking. It takes more than Nokia shooting itself in the foot with Microsoft's gun to kill Qt.

Re:I use it so it's relevant to me. (2)

marcosdumay (620877) | about 2 years ago | (#42338507)

Almost no one but the hard core geek uses their mobile browser as much as the voice or texting services they purchased the phone for in the first place.

It's email (I'm resisting the temptation to finish that setence with "stupid", because you really doesn't deserve that label).

People use smartphones for email and things similar to it, like twiter and facebook updates. Not for the web, not for complex work, but for communication.

I used to think it was just me, but then, all the studies I've seen recently about how people read email point to that.

Re:I use it so it's relevant to me. (0)

Anonymous Coward | about 2 years ago | (#42338591)

Reading an article on the Internet is hardly "complex work." So how is it again that all the "desktop is dead" articles are being read on desktop computers? The point is that phones aren't replacing PCs the way that the popular brain damage says they are.

Re:I use it so it's relevant to me. (0)

Anonymous Coward | about 2 years ago | (#42338961)

There are definitely alternatives other than Qt and wxWidgets, but they're much smaller in scope and more specialized.

I work on phoenix, which is a wrapper around Win32+GTK+Qt, and eventually Cocoa. The idea being that you target whatever toolkit is native with the same code. Saves you 5-10MB worth of DLLs that you'd have to distribute with Win32/Qt, for instance. This approach has the incredibly major downside that your feature set is limited to the least common denominator of every platform, so you are limited to the most barebone UI components. Great for small apps, though.

Re:I use it so it's relevant to me. (3, Informative)

TemporalBeing (803363) | about 2 years ago | (#42340015)

It's mature and has all the bells and whistles. Only other alternative is WxWidgets...

What else did you have in mind ?

Here's the basic group that Qt belongs as part of:

  • Qt
  • Gtk
  • WxWidgets (WxWindows)
  • SDL

WxWidgets is public domain; and was the first (AFAIK) to do both Signals/Slots and Message Maps for inter-object comms.

Gtk was originally just MessageMaps, and now also does Signals/Slots; but it also tends to be heavily GNOME centric and rather largely ignored by GNOME in maintaining it - it moves along, but at a snails pace because they're not really paying attention to it (to my understanding from talking to someone in the GNOME community).

SDL isn't quite as feature complete as any of the others, but can get the job done.

Qt is really the only first class library in that group, and now reaches even more platforms than ever before. And with Qt embedded, it runs in many devices that you may never have thought of as having run Qt (Microwaves, TVs, Refrigerators, etc.). Qt really is to multi-platform development what Linux is to processors in that respect.

So in the sense that nothing else is really as feature complete and professional as Qt - yes, it's in its own category. But in reality there are several other major competitors - and all from the FLOSS community at that.

How is Qt still relevant? (4, Informative)

Andy Prough (2730467) | about 2 years ago | (#42337989)

It's the framework for KDE, which is the excellent, fast UI environment I use on my Linux rigs. Apparently a huge number of other projects either use it currently, or have used it in the past, including a number of well-known projects: Amazon Kindle, Google Earth, Adobe Photoshop, MythTV, Rosegarden, Skype, Virtualbox, VLC media player.

Re:How is Qt still relevant? (1)

Trepidity (597) | about 2 years ago | (#42338067)

Is it actually used on the Kindle? The only Qt-on-Kindle project I know of was an unofficial port [google.com] which was abandoned by the maintainer two years ago.

Re:How is Qt still relevant? (3, Informative)

darronb (217897) | about 2 years ago | (#42338485)

Mine, also abandoned. I quickly stopped using the Kindle once it was obvious it was useless for viewing datasheets. http://www.griffin.net/2010/01/hacking-the-amazon-kindle-dx-part-2-qt-and-sudoku.html [griffin.net]

Re:How is Qt still relevant? (1)

Andy Prough (2730467) | about 2 years ago | (#42338601)

Nice work Darron - good proof of concept. Looks like some people did get some use out of the project.

Re:How is Qt still relevant? (5, Informative)

Vektuz (886618) | about 2 years ago | (#42338849)

On the business software side, there's also well known applications like Autodesk Maya (2011 and above, they switched TO qt recently!), and also the Perforce client (P4V). I'm seeing more and more of it in the internals of "big" apps like that, even if the user is unaware. I have a feeling its partly because of the LGPL side of things opening up more than anything. Although I'm pretty sure autodesk licensed it commercially.

Re:How is Qt still relevant? (0)

Anonymous Coward | about 2 years ago | (#42339373)

But KDE uses QWidgets which are being de-emphasized :-)

Re:How? (4, Insightful)

gmuslera (3436) | about 2 years ago | (#42338015)

One framework to rule them all, making programs for all platforms, including mobile ones, is a nice goal.

Re:How? (1)

StripedCow (776465) | about 2 years ago | (#42340099)

One framework to rule them all

But for Android and iOS support, we'll have to wait until late 2013.

Re:How? (1)

Anonymous Coward | about 2 years ago | (#42338059)

Because all other frameworks suck?

Re:How? (2)

rocjoe71 (545053) | about 2 years ago | (#42339073)

Hey, several of my favoruite Windows apps are in Qt (e.g. from my WinXP days: "Launchy", and current versions of TweetDeck and Calibre).

Qt-on-Windows runtime installs much like the Visual C++ runtime, and that, for me, is preferable over any app done in Java/Perl/Python, as I don't have to clutter up my system with RTEs (that are all too often supporting a single app)

...and not one annoying "time to update your runtime... AGAIN" ... ever!

Re:How? (5, Informative)

TemporalBeing (803363) | about 2 years ago | (#42340081)

How is Qt still relevant?

Let's see...

It's the only multi-platform development kit that is really as feature complete as most platforms.

It runs on more devices than you'd ever imagine - from small embedded devices to your kitchen appliances to mobile devices to desktops and servers.

It's what KDE is built on.

It's what MeeGo/Mer/Tizen/Sailfish are built on.

It's what Blackberry 10 (BB10) is built on.

AutoDesk is built on it.

CiscoVPN is built on it (well, a really old version at least).

There's plenty more out there; but I'm going to stop there.

A good example of a bad summary (0, Redundant)

i kan reed (749298) | about 2 years ago | (#42337759)

This is like the millionth time that we've had a headline that is "Open source project whose name does not imply function releases new version"
And a summary that is "The version number, which we're happy to tell you, was highly anticipated, but forget any discussion of what the project is".

I know we like open source here, but if the project is anything other than linux, a major distro, or a major programming language, this is awful editting, that repeats over and over. Not even mentioning any new features is inexcusable.

For everyone else: Qt is a library/framework for developing GUI applications.

Re:A good example of a bad summary (-1, Troll)

bluefoxlucid (723572) | about 2 years ago | (#42337839)

For everyone else: Qt is a library/framework for developing really shiny themes that impress people enough for them to surmise it's better than GTK+.

Fixed. Qt has more shiny themes than GTK+, hence thousands of non-programmers continue to talk about how superior it is to GTK+. (Well, it's superior in its ability to increase program load times and consume a lot more RAM, I guess...).

Re:A good example of a bad summary (5, Insightful)

Anonymous Coward | about 2 years ago | (#42337861)

... hence thousands of non-programmers continue to talk about how superior it is to GTK+

Having done a small amount of Qt programming, it's also one of the most pleasant APIs I've worked with, both in its C++ form and in PyQt.

Re:A good example of a bad summary (0, Interesting)

Anonymous Coward | about 2 years ago | (#42338355)

Try to make tabs that you can drag and drop as docks with the central widget of QMainWindow. Better yet, look up QThreads and the QObject supering solution...
Tell me how you like that "pleasant APIs" then...

I agree it's probably the best GUI kit for simple or obvious stuff. But it's lacks are hardwired in the core widgets so unless you are prepared to rewrite QMainWindow - not just super it mind you - you're fucked. This is especially true when it comes to the language bindings like PyQt.

Considering the cluster fuck GTK has become, I'm betting on EFL myself and have started (this week) to learn it. It's still quite young but it's already clear to me that it addresses all those weakness I've mentioned and many more right from the start. I just hope it will become more mainstream now that E17 is pushing stable.

Re:A good example of a bad summary (2)

Johann Lau (1040920) | about 2 years ago | (#42337973)

That seems like totally valid criticism to me. So you're saying Qt is equal or inferior in all respects, and uses more resources? You should blog about this, because no amount of googling turns up remotely similar results. As a matter of fact, people seem to be quite happy with Qt, and "shinyness" doesn't even get mentioned in those discussions. Or is shiny just code for "not as fugly" .. ? Please elaborate.

Re:A good example of a bad summary (0)

Anonymous Coward | about 2 years ago | (#42338491)

Please elaborate.

Trolls don't elaborate. They troll.

Re:A good example of a bad summary (1)

Johann Lau (1040920) | about 2 years ago | (#42338795)

I know that... I was essentially asking to be trolled some more :D

Re:A good example of a bad summary (1)

fredprado (2569351) | about 2 years ago | (#42337979)

There is no comparison between QT and GTK+. QT is by far superior in about everything. Only hipsters like you think otherwise.

Re:A good example of a bad summary (0)

Anonymous Coward | about 2 years ago | (#42338065)

I can vouch for this as someone whose primary reason for liking gtk+ was that it was in C:

QT is definitely better architected, and especially in newer iterations QT is generally much faster with the default widgets than GTK+ 3.

Additionally they've got the excellent qt-creator, of which I have yet to find a decent gtk+ equivalent (adjunta(sp?) is ok, but it's got a lot of gnome interdependancies for basic functionality, whereas QT rolls all the important stuff into a single uniform library base.)

Additionally QT is MUCH better at being cross-platform than gtk+ in it's default form.

Re:A good example of a bad summary (2, Informative)

Anonymous Coward | about 2 years ago | (#42338159)

You obviously never programmed with QT then. QT API is generally pleasant to work with in that it's well documented, consistent, and not unnecessarily complex with a decent amount of examples.

QT is a larger framework because it does quite a bit more then GTK+ and others. In a Linux environment, that ram usage is shared so you can end up using much less ram in the end with multiple programs running on the same large library. This unfortunately is less of an advantage in Windows (where you see much less GTK+ or QT) but QT is split into several libraries meaning that you don't have to attach the entire framework to your code.

Realistically, QT isn't that large of a library for modern applications. It's definitely not the smallest but ease of programming is something to be said.

Is GTK+ bad? Never said that, but neither is QT. Simply pick the best library that works for you. For me, QT is definitely one of my top choices (though not always) after working with several frameworks.

Re:A good example of a bad summary (1)

bluefoxlucid (723572) | about 2 years ago | (#42338493)

RAM usage doesn't come from big libraries. It comes from massive data sets being used to instantiate a whole bunch of shit. Libraries, even big ones, are small.

Re:A good example of a bad summary (0)

Anonymous Coward | about 2 years ago | (#42339163)

While what you said is true for static linked libraries, dynamically linked ones load the entire library into memory. Both GTK+ and QT are LGPL meaning being static linked severely limits your license choice of your application (A biggie for Windows which tends to be more commercial or freeware) and loses the benefits of Linux shared libraries (Static linked generally only used for standalone Linux packages that don't rely on a repository but user downloaded installation). Basically, many application will tend to be dynamically linked either due to license issue or reduced ram usage (when used with multiple programs).

The type of ram usage depends entirely on the application where the library can make up the majority of ram usage or the minority when dynamically linked. You really can't generalize though it's more simple programs that tend to be the former.

Your remark though of "Well, it's superior in its ability to increase program load times and consume a lot more RAM, I guess" which is the main part I have issue with can be inferred as "QT has no merits beyond extra ram usage over GTK+." That is false and ignores that people prefer different things. There are plenty of reasons why one would choose QT of GTK+ (the opposite is also true) like it's larger range of supported devices, API like Qt Quick, and probably other things like user preferences of slots/signals over events/callbacks.

Basically, QT is perfectly fine. It's main role is similar to GTK+ but so what? So is many libraries that all do the same things. Everyone has their personal preferences. If alot of people prefer QT, well, obviously there some merit to it but I'm sure many people like you will also prefer GTK+. Discussing about implementations leads to improvements or at least knowledge, outright dismissal of implementations can lead to ignorance.

Re:A good example of a bad summary (3, Insightful)

mark-t (151149) | about 2 years ago | (#42337855)

...or, they could just follow the link and see for themselves.

Oh right, this is slashdot.

But it's not even like you have to read anything. It's a video demonstration.

Re:A good example of a bad summary (0)

Anonymous Coward | about 2 years ago | (#42337871)

It's not just for GUI applications. The library has a bunch of different features that help make cross platform applications such as networking. (I use it for other things now since I'm used to all the templates and features that come with it.) But yeah, mostly used for GUI applications.

Re:A good example of a bad summary (0)

TigerTime (626140) | about 2 years ago | (#42337879)

Yep. From the summary, I have no idea what Qt does. What is new in this version. Or how it affects me.

All the summary told me was that it's a new version of a C++ project. And it's supposed to be better than the last version.

Re:A good example of a bad summary (5, Funny)

AvitarX (172628) | about 2 years ago | (#42338253)

Even worse, I don't know what "C++" or "project mean"!

Re:A good example of a bad summary (2)

lister king of smeg (2481612) | about 2 years ago | (#42338417)

It is not is such a unreasonable thing as to assume basic knowledge of the field. This is a site predominantly amid at compsci people and largely open source/*nix people at that. Knowing what qt is or the ability to find out on your own what qt is, is not unreasonable here. If you think they should have give you a definition of qt then why not ask for a definition for C++ as well as that would be just as nonsensical in this context.

Re:A good example of a bad summary (2)

Just Brew It! (636086) | about 2 years ago | (#42338653)

Agreed. I've never developed anything using Qt, but have a pretty good idea of what it is. Even if I'd never heard of it before, a couple of mouse clicks and 3 keystrokes (assuming I've got Google or Wikipedia bookmarked) would've yielded an answer in seconds. Given this, and the fact that most people on /. probably already have at least a vague notion of what Qt does, I don't think it is necessary to explain it every time it comes up.

Re:A good example of a bad summary (1)

jeffmeden (135043) | about 2 years ago | (#42337895)

If you don't know exactly what QT is/does since the first time you compiled it in order to run kvirc back in 1998... Then I don't know what you are even doing here.

Re:A good example of a bad summary (5, Insightful)

matunos (1587263) | about 2 years ago | (#42337937)

If you didn't already know what Qt was, then you're probably not going to be particularly interested that version 5.0 is out.

Re:A good example of a bad summary (1)

Apu de Beaumarchais (2023822) | about 2 years ago | (#42338305)

Not necessarily true. I found out about Qt from this previous /. story [slashdot.org] , looked into it and was impressed by what I saw and since then have used it for a number of projects.

Re:A good example of a bad summary (0)

PNutts (199112) | about 2 years ago | (#42338385)

If you didn't already know what Qt was, then you're probably not going to be particularly interested that version 5.0 is out.

Of course I know what QuickTime is. I occasionally uninstall it so I can reinstall it and get the offer to upgrade to Pro so I can see the chick on the surfboard.

Re:A good example of a bad summary (1)

knuthin (2255242) | about 2 years ago | (#42337971)

this is awful editting

That doesn't sound right coming from a person spelling "editing" wrong.

Re:A good example of a bad summary (0)

Anonymous Coward | about 2 years ago | (#42339441)

Because Outlook, Excel, Access and Powerpoint are just totally evocative of email, spreadsheets, databases and presentations.

Also, do you not have that function in your browser where you highlight a word, right click it and select 'Search for X with Google/Bing/Yahoo/whatever' from the context menu? What kind of person just stares at a word they don't understand and then goes to the trouble of complaining that whoever wrote the word didn't tell them what it means? Put just the tiniest bit of effort in ...

CAPTCHA: Moaned. How appropriate

Qt Qt Qt (0)

Anonymous Coward | about 2 years ago | (#42337779)

The Qt project and the company behind Qt says the latest version of Qt, which is an overhaul of the previous Qt version, is one of the very bestest releases of Qt that Qt has ever released. Qt!

Re:Qt Qt Qt (1)

NotBorg (829820) | about 2 years ago | (#42338411)

That's true of any product release by any company. The releaser is always going to make the claim that it's better than before. It's up to you, the consumer, to look at the product and make a decision. If you want to make an informed decision you'll probably need to look at both what its promoters and its detractors have to say about it. This article is obviously about the promotion side of the product. You may find some detractors in the comments but so far they're doing a piss poor job. You'll have to try Google.

You should probably not click on articles that are obviously (from the subject line even) intended to promote a new version. They're going to upset you because they are by nature somewhat one sided. For the rest of us, that's not a major point of contention because we know who's point of view it's from and that we'll have to do some more looking if we want to be wholly informed.

Now sit down and shut up. People will think you're more intelligent that way.

How about beefing up the summary a little ? (0)

Anonymous Coward | about 2 years ago | (#42337783)

Especially considering how irrelevant point releases are this days.

Has it grown to encompass the entire OS yet? (0)

Anonymous Coward | about 2 years ago | (#42337793)

Looks to be on the way to that, instead of just keeping a good clean GUI system. So, when is full QT OS coming out?

Re:Has it grown to encompass the entire OS yet? (2)

gmuslera (3436) | about 2 years ago | (#42338051)

You build things over it, like desktops (like KDE [kde.org] ) or mobile (like the upcoming Sailfish [sailfishos.org] ) environments.

Tablet support? (0)

Anonymous Coward | about 2 years ago | (#42337857)

Last I heard they pulled Wacom tablet support. (QTabletEvent is still there, but never gets generated) Assuming this is still the case, this makes it a non-starter for a bunch of Qt Apps -- off the top of my head; Mari, Maya, and Mudbox among others.

Re:Tablet support? (2)

Unknown Lamer (78415) | about 2 years ago | (#42337997)

The standard xinput mechanisms have full tablet support now. You can even use use cheap knockoff tablets now thanks to digimend [sourceforge.net] (I got one from monoprice and it's pretty great for messing around with handwriting recognition and I've discovered that image editing with a trackball + tablet is great). Unfortunately all tablets are kind of broken except in the latest release of X.org because of a bug with coordinate transformations (basically, the pointer jumps if you make pressure changes without moving because the code transforms the already transformed coordinates... it also left touchscreens pretty broken; the guy that fixed it caused something like a dozen ubuntu on nexus 7 bugs to be closed!).

Re:Tablet support? (1)

ameline (771895) | about 2 years ago | (#42338111)

You're being a little Linux biased there -- I think the OP was referring to tablet support on windows. And I believe that it is broken in Qt 5 on windows. (I'd be happy to be wrong on this.)

I'm sad :'( (-1)

Anonymous Coward | about 2 years ago | (#42337877)

My foot hurts.

Lies. (0)

Anonymous Coward | about 2 years ago | (#42337961)

I work at QT, and have serious doubts that we could release a programming framework like this.

Re:Lies. (1)

Anonymous Coward | about 2 years ago | (#42339739)

QT isn't the company...troll.

C++ Standards (3, Interesting)

joelholdsworth (1095165) | about 2 years ago | (#42337969)

Did they make any moves towards using standard C++ features rather than the MOC ugliness? What with Boost::Signals, sigcxx and C++11, I see no reason why they have to bastardise the language to provide signals.

Re:C++ Standards (1)

joelholdsworth (1095165) | about 2 years ago | (#42338011)

RTFA: They have made some good progress on this - but I can't tell if MOC is dead yet.

Re:C++ Standards (2)

Desler (1608317) | about 2 years ago | (#42338049)

They aren't eliminating MOC. For one thing, they support a number of compilers that don't have and probably never will have full C++11 support.

Re:C++ Standards (2)

stenvar (2789879) | about 2 years ago | (#42338173)

You don't need C++11 to replace MOC. MOC was obsoleted by C++ features many years ago.

Re:C++ Standards (1, Informative)

loufoque (1400831) | about 2 years ago | (#42338689)

Let me add that In this particular instance, many is 15 years.

Re:C++ Standards (1)

Urkki (668283) | about 2 years ago | (#42339369)

Let me add that In this particular instance, many is 15 years.

How do you call a C++ method by it's name from QML or javascript or C++ plugin without some kind of pre-prosessing step which actually stores the method names and argument types somehow to make invocation possible?

Re:C++ Standards (1)

loufoque (1400831) | about 2 years ago | (#42339641)

dlsym(h, "my_method")
There is no need to store it, it's already in the symbol table.

If you do want to store it, there is no need to use an external preprocessor anyway.

Re:C++ Standards (1)

TemporalBeing (803363) | about 2 years ago | (#42340175)

dlsym(h, "my_method") There is no need to store it, it's already in the symbol table.

If you do want to store it, there is no need to use an external preprocessor anyway.

That works for functions, but not Class Methods that require an instance of the class. And, even more so, how do you do it in a multi-platform environment in a uniform way? (http://en.wikipedia.org/wiki/Dynamic_loading). Windows doesn't use dlopen/dlsym/dlclose but has its own Win32 functions to do something similar. You're also relying on RTTI; and not every compiler or environment supported by Qt supports RTTI. (RTTI also has its own run-time overhead which is bad in embedded environments like what Qt supports.)

Re:C++ Standards (0)

Anonymous Coward | about 2 years ago | (#42339139)

No, it wasn't. Read e.g. http://www.macieira.org/blog/2011/09/the-future-of-moc/ , and http://doc.qt.digia.com/qt/templates.html.

Re:C++ Standards (0)

Anonymous Coward | about 2 years ago | (#42338077)

Then you don't understand what Qt has to offer. The signals and slots in Qt are awesome.

I for one welcome my MOC overload.

Re:C++ Standards (5, Informative)

N3Roaster (888781) | about 2 years ago | (#42338081)

Yes and no. The signals and slots mechanism is still there and it's still using moc, but there's a new connection syntax available that's a lot more C++ like, allows C++11 lambdas in place of slots, and offers compile-time checking of connections that previously would just fail at run time. Won't please the purists, but it's a step in the right direction.

Re:C++ Standards (0)

Anonymous Coward | about 2 years ago | (#42338099)

How are the degenerated boost and sigcxx reimplementation of Qt signals and slots system any more standard than the original? They even use preprocessors now like Qt does.

Re:C++ Standards (1)

Anonymous Coward | about 2 years ago | (#42338167)

Moc provides nice introspection features not available in normal C++. Why remove that? They are needed to integrate QML (declarative language for UI design) with C++.

You can use template-based signals and slots in Qt5 and even connect signals to lambdas.

Re:C++ Standards (1)

Noughmad (1044096) | about 2 years ago | (#42338307)

Yes, they did. See the wiki page [qt-project.org] .

Signals and slots (4, Informative)

zenyu (248067) | about 2 years ago | (#42338391)

You can now use any C++ function as the target of a signal using the new QObject::connect() syntax. This is a huge win because with the new syntax the compiler and linker can check that the connections are valid instead missed connections just causing a run-time error.

The moc preprocessor is still required for QObject derived classes, mostly for the translation framework and also to provide support for the old signal/slot syntax which is still allowed. Qt5 doesn't require a C++11 compliant compiler, which is a good thing since there aren't yet any fully compliant compilers. I'm sure if there is a Qt6 it will require C++11 and use those features.

Some of the really cool C++11 features like move constructors aren't necessary with Qt because it's containers implement reference counted copy-on-write, so when you assign a QMap from another QMap no copy is made, and if the old QMap was an rvalue then there is never a need for the copy to be made when the new QMap is modified. One of the big improvements Qt4 made over Qt3 was to make container assignment atomic so this mechanism worked with threaded code and defensive deep copies weren't necessary anymore.

Re:C++ Standards (0, Insightful)

Anonymous Coward | about 2 years ago | (#42338817)

Wait, C++ is already horribly ugly all by itself.

Also I love the rationale for MOC, basically it's "we already have 11 layers of crap, so why not a 12th".

KDE5? (1)

pak9rabid (1011935) | about 2 years ago | (#42337975)

How is this going to impact KDE? Will this be the start of KDE5?

Re:KDE5? (1)

Anonymous Coward | about 2 years ago | (#42338369)

All the development of Qt5 has been public and KDE is well aware of it. KDE5 has been in the plans for some time (more than a year), it will be done eventually.
But we don't have to worry, the transition from 4 to 5 won't be as traumatic as from 3 to 4 because no major changes are required, it will probably be pretty smooth.

Re:KDE5? (1)

NotBorg (829820) | about 2 years ago | (#42338433)

I read somewhere a while back that KDE was going to try to reduce the duplication of effort between KDE and Qt and rely more on Qt. I don't know where they're at with this but I'd like to here more.

Re:KDE5? (1)

NotBorg (829820) | about 2 years ago | (#42340119)

I'd like to hear more here, I mean.

A glorious day (5, Insightful)

mozumder (178398) | about 2 years ago | (#42337993)

This really is the best cross-platform Apps framework out there. Far better than HTML5/Javascript.

standard compliance? (2)

stenvar (2789879) | about 2 years ago | (#42338001)

So, is it fully standard C++ now or do you still have to use their hokey preprocessor?

Re:standard compliance? (0)

Anonymous Coward | about 2 years ago | (#42338639)

Does thinking of it as a bridge to all those not-quite-fully-standard compilers help overcome your disdain?

Re:standard compliance? (1, Informative)

loufoque (1400831) | about 2 years ago | (#42338701)

It's still a moc'ery of C++, if that's what you're asking.
And it still duplicates everything that's in the standard library, including containers, threads, files, etc.

Re:standard compliance? (2)

Anonymous Coward | about 2 years ago | (#42339083)

Fixed this for you:

And it still duplicates everything that's NOW in the standard library, including containers, threads, files, etc. for the set of compilers and run times that are compliant.

Re:standard compliance? (1)

Urkki (668283) | about 2 years ago | (#42339035)

So, is it fully standard C++ now or do you still have to use their hokey preprocessor?

Well, for many things Qt requires reflection features not provided with C++. When/if C++ starts to provide them as part of the language, I'm sure moc will become thing of the past, and be replaced with just translation data extractor, which you can leave out if you do not care about internationalization. But for what it's worth, with the new signal-slot connect syntax it's probably possible to have meaningful programs without running moc, if that makes someone happy.

Re:standard compliance? (1)

suy (1908306) | about 2 years ago | (#42340141)

So, is it fully standard C++ now or do you still have to use their hokey preprocessor?

Qt is, and always has been fully standard C++. The "moc" program is not a preprocessor, is just a tool, more precisely, just a code generator that writes for you some files that you have to either include at the end of your ".cpp" or you have to compile and link like other hand-coded files. If you use QMake, or CMake or any other buildsystem that has some Qt support (and most do), is completely effortless.

At a first glance, you see things that might look like an extension to the language, because you see stuff like "protected slots:" in addition to plain old public/private/protected C++. But here "slots" is just defined (using the standard C/C++ preprocessor) to an empty string, so the compiler sees the usual keywords only. Why is needed if is just an empty string? Well, because "moc" will use it when generating code.

Is possible to argue if all this (standard) preprocessor tricks are good or bad practice, but I have to say that it works for me. Qt has attemted to support a wide variety of environments, and the level of C++ support on those environments it's not the same. I even remember when TRUE and FALSE were provided as #defines because not all compilers had it. Right now I'm doing Qt development on an iMX23, and I'm quite constrained by the C++ compiler that Freescale provides, and I'm using Qt 4.8 just fine, the (till today) latest and greatest version.

Finally fit! (1)

MouseTheLuckyDog (2752443) | about 2 years ago | (#42338019)

"It's an overhaul of the Qt 4.x series and makes Qt fit for the future."

You mean to tell me that the old version of Qt were unfit?

Re:Finally fit! (2)

Kjella (173770) | about 2 years ago | (#42338259)

You mean to tell me that the old version of Qt were unfit?

Apparently it had far too little buzzword-compliance with their traditional widget-based imperative style GUI, now it's HTML/CSS/Javascript and declarative style GUI that is the "hot thing". I guess the good side is that it's like writing a web app that many developers know how to do but it has pretty much all the bad sides too, personally I find it's a giant step backwards. Or rather if I was going to do it this way I'd probably just go for HTML+JQuery and make it run in a browser against a back-end instead.

Re:Finally fit! (1)

lister king of smeg (2481612) | about 2 years ago | (#42338459)

It's an overhaul of the Qt 4.x series and makes Qt fit for the future.

You mean to tell me that the old version of Qt were unfit?

there is a large difference between unfit and not as fit as it could be.

Scintilla? (0)

Anonymous Coward | about 2 years ago | (#42338107)

I've used wxWidgets/wxWindows in the past, and that has Scintilla built in. (Scintilla does syntax colouring for dozens of languages, allows bookmarks, breakpoint markers, etc, expand/collapse and is a good foundation for an IDE) I'm about to start a big project which includes a Lua editor/debugger, and now I'm wondering if I should look at Qt.

Does Qt 5 (or earlier) have a similar component to Scintilla? I presume it has all the other IDE-type stuff like docking panes, tab-based "notebooks", etc.?

Re:Scintilla? (1)

EvanED (569694) | about 2 years ago | (#42338311)

QScintilla is available for Qt4, though it's probably a separate package.

I can't speak to everything, but I will pretty highly recommend the library. I've used it in both C++ and Python (via PyQt) and both times have been a remarkably pleasant experience. The C++ side's biggest drawback is they have a preprocessing step (the MOC compiler) that means that you won't be writing code which isn't standard C++: they've got a bunch of language extensions. I wouldn't imagine that anything significant would be missing.

Re:Scintilla? (2)

AvitarX (172628) | about 2 years ago | (#42338499)

I will add that I love their sidebar docking, floating, tabbing, etc (see Eric IDE for a good example).

Eric makes use of QScintilla.

Re:Scintilla? (0)

Anonymous Coward | about 2 years ago | (#42338757)

Thanks guys. I'll look at Eric for inspiration :)

Re:Scintilla? (2)

RoccamOccam (953524) | about 2 years ago | (#42338937)

What about PySide? Is it mature enough to use for full-blown apps? Did PyQT change the licensing to make PySide irrelevant?

Re:Scintilla? (0)

Anonymous Coward | about 2 years ago | (#42338575)

In PyQt, QMainWidget has docks. QTabWidget does tabs. But they don't play along so you can't drag and drop a tab in the central QMainWindow widget as a dock.

I think QTextEdit processes HTML but I never used it that way so I'm not sure if JavaScript can be used... If it can, then you can use any JavaScript\CSS syntax highlighter but I don't code JavaScript so I wouldn't know. In python you could just glue in a JavaScript engine in half a dozen lines and output html through that... But in C++? probably 50 lines of boiler plate... Good luck :D

Re:Scintilla? (1)

pwizard2 (920421) | about 2 years ago | (#42339381)

Yes, QTextEdit handles both HTML and plain text. If you want to export the current text as a full HTML document, you call toHTML(); and if you want plain text you call toPlainText(); Both methods produce a QString that has the text area contents.

Someone has probably already extended QTextEdit to make a drop-in widget that has better syntax highlighting. I know the same thing has been done for spell check.

Quicktime 5? Talk about old news (0)

Anonymous Coward | about 2 years ago | (#42338351)

Slashdot has really been behind the times lately but this realllly takes the cake. Quciktime 5 has been out since April of 2001 and they are up to 7.6.6. ;)

Awesome (1)

Vektuz (886618) | about 2 years ago | (#42338821)

QT is about the best "native SDK" I've seen out there. In the company I work at, we dev our internal tools in Qt, and at home my hobby projects are in Qt also. They run on mac, linux, and windows. Other projects that run on Qt include Maya (Autodesk), they recently swapped over to using 4.7.1. Knowing autodesk, in only a couple decades they'll switch to Qt5!

Re:Awesome (1)

pwizard2 (920421) | about 2 years ago | (#42339501)

I'm still using 4.7.4 and I intend to do so for a long time. My main reason is to keep pace with the Debian repositories (4.7 support was recently added to testing, stable still has 4.6). For the past year I've been working on an app that won't build on 4.6 b/c of new features added to 4.7, meaning support in Debian Stable was out unless you roll your own Qt. Anything I write for Qt 4.7 will probably compile fine with Qt5 (if necessary) or run under Qt5 libs so I see no reason to upgrade.

How is Qt Quick? (3, Interesting)

dannydawg5 (910769) | about 2 years ago | (#42338909)

I used Qt Quick briefly. It seems like you get a lot of deep powerful customization, but that comes at a cost. It eventually pissed me off so I went back to QWidget, and my productivity soared.

I would not have completed my project in a reasonable time using Qt Quick. It is not "quick". Sometimes, you just want to drop tables, check boxes, buttons, etc. on to your main window, tie the click event to a slot, and call it done. You are fine with whatever default styling and rendering that Qt and the OS decide is appropriate for the widget's click/hover/etc event.

It seems with Qt Quick, you have to specify all that nonsense. Plus, the Qt Quick editor tool felt complex and confusing. I avoided it and did everything by hand. Qt Designer for QWidgets is a drag-n-drop breeze. I even got my manager on board after he saw me using it. He is an EE, and he really likes it. He is used to spending $500 on Visual Studio Pro to what Qt Designer does better for free.

Maybe I just needed to study Qt Quick more to get past the learning curve, but I knew how to do it the widget way, and I wanted the project done.

Has anybody had success migrating their project from QWidgets to Qt Quick? Unless I see a strong compelling reason, I am sticking with QWidgets. It works really well for me.

Re:How is Qt Quick? (0)

Anonymous Coward | about 2 years ago | (#42339009)

I didn't do anything with Qt Quick yet besides of reading some docs and opinions, at this time is more oriented to do fancy things for mobile, but IMHO is not a replacement for QWidgets yet, however a guy is working on it since almost two years ago:

http://blog.qt.digia.com/blog/2011/03/10/qml-components-for-desktop/

Re:How is Qt Quick? (0)

Anonymous Coward | about 2 years ago | (#42339403)

It's perfectly fair to use QWidgets. I think it's awesome that the framework provides full support for widgets while exploring and improving QtQuick. Today QtQuick is good for those who want full customisation - which means a lot of embedded apps our there - and it's also moving in the direction of providing standard components (see Qt Components) that work better with the RAD model that Designer, Widgets and Signals/Slots are built around.

Widgets are there, but will fade with the years as they are very rigid and hard to animate. QtQuick is awesome for that but needs a few more years to fully replace widgets.

Re:How is Qt Quick? (0)

Anonymous Coward | about 2 years ago | (#42339491)

I used Qt Quick briefly. It seems like you get a lot of deep powerful customization, but that comes at a cost. It eventually pissed me off so I went back to QWidget, and my productivity soared.

I would not have completed my project in a reasonable time using Qt Quick. It is not "quick". Sometimes, you just want to drop tables, check boxes, buttons, etc. on to your main window, tie the click event to a slot, and call it done. You are fine with whatever default styling and rendering that Qt and the OS decide is appropriate for the widget's click/hover/etc event.

It seems with Qt Quick, you have to specify all that nonsense. Plus, the Qt Quick editor tool felt complex and confusing. I avoided it and did everything by hand. Qt Designer for QWidgets is a drag-n-drop breeze. I even got my manager on board after he saw me using it. He is an EE, and he really likes it. He is used to spending $500 on Visual Studio Pro to what Qt Designer does better for free.

Maybe I just needed to study Qt Quick more to get past the learning curve, but I knew how to do it the widget way, and I wanted the project done.

Has anybody had success migrating their project from QWidgets to Qt Quick? Unless I see a strong compelling reason, I am sticking with QWidgets. It works really well for me.

A lot of this is coming up in the 5.1 release. You might be interested in watching http://www.youtube.com/watch?v=Y1pqL5bXe0A

Load More Comments
Slashdot Login

Need an Account?

Forgot your password?