
Qt 5.3 Release Candidate Available - bratao
http://blog.qt.digia.com/blog/2014/05/08/qt-5-3-release-candidate-available/
======
jnbiche
Qt has shaped up to be such an attractive, pleasant-to-use framework. QML has
turned out quite convenient, too. It's a pity that Qt's foundation remains a
fundamentally memory-unsafe language like C++.

I'm using a lot of languages now that offer significantly more safety, both
memory and type (including OCaml, Golang, and playing with Rust).

Even with the very welcome additions of C++11/14, it still seems like I'm
stepping back into a previous era when I write C++. I use C occasionally, but
when I do I _know_ I'm manipulating memory directly, and if I'm not careful it
can bite me. C++ has adopted so many modern language features that it's easy
to forget it shares many of the same attributes as C, even if most of them are
now avoidable with care and attention.

One nice response to this dilemma is Niemeyer's go-qml (sponsored by Ubuntu,
if I'm not mistaken). go-qml allows you to create your main Qt program in Go,
leaving QML for the layout only. So no C++ at all (except under the covers, of
course). I look forward to seeing how go-qml evolves [1].

1\. [https://github.com/go-qml/qml](https://github.com/go-qml/qml)

~~~
cheez
> It's a pity that Qt's foundation remains a fundamentally memory-unsafe
> language like C++.

<Groan> Come on.

C++ takes 1 to 2 years tops to develop good habits provided you either read
the effective C++ series or you have a good mentor. Just like any other
language. What it sounds like you're saying is that programming languages
should not require expertise. Maybe. It can be instructive to look at other
engineering disciplines to see how much they rely on fundamental knowledge or
how much their tools abstract for them to see how programming will go.

That being said, I do (rarely) run into memory issues when it comes to
threading but the last time I had a buffer overrun or anything of that sort
was probably years ago. I reckon these threading bugs are easy to create with
most languages, except maybe Go.

When C++ adopts a proper module specification, my last complaint about it will
be gone (compile times).

~~~
jnbiche
>C++ takes 1 to 2 years tops to develop good habits provided you either read
the effective C++ series or you have a good mentor. Just like any other
language.

But it's really _not_ like any other language. In most other modern languages,
you can write relatively safe code _while_ you're mastering it. You may write
unidiomatic code as you're learning, but you're not going to leave integer
overflows or (with some modern languages) null pointer errors throughout your
code.

So yes, I guess am saying programming languages should not _require_ years of
expertise. It's _beneficial_ to have a Python or Go expert around, but you can
write perfectly respectable code in these languages after a few weeks if
you're an experienced programmer. Even in other paradigms like OCaml and
Haskell, I see most skilled programmers picking up idiomatic usage after a few
months.

What's idiomatic C++? What's safe C++? It's hard to define, and it's a vast
language. C and C++ are fine tools to use if you're already an expert (except
for those pesky bugs that bring down Internet security).

But for new language learners, there are _thankfully_ a new wave of safe, type
safe languages coming on board.

~~~
cheez
C++03, sure, but not C++11.

If any C++11 course begins with using raw pointers or arrays, they're doing
the students a disservice. There are safe and unsafe parts of the language,
the trick is when to use which.

Go, Erlang, etc are all designed to be used for particular purposes. Go may
break out of its box because it is a general purpose language, but its core
use case is concurrency just like Erlang. I honestly doubt it will because its
syntax is ugly, though not as fugly as C++ can be.

I feel like the majority of C++ programmers would support gun ownership, which
might say a lot.

------
icefox
Its a shame the the new features page in Qt 5 doesn't have screenshots.
Pictures are always easier to digest and the new features page always seem to
be a great marketing opportunity v.s. just a list of things.

Compare the 5.3 page [http://qt-project.org/wiki/New-Features-in-
Qt-5.3](http://qt-project.org/wiki/New-Features-in-Qt-5.3)

With the 4.5 page:
[http://doc.qt.digia.com/4.5/qt4-5-intro.html](http://doc.qt.digia.com/4.5/qt4-5-intro.html)

------
mc_hammer
feature request: add a richtext control that doesnt suck (like richtext)

------
kungfoocoder
I have been building Qt 5.3 and Qt Creator almost weekly and the move from X11
to XCB sounds attractive but when it comes to font rendering, it is terrible.
All the fonts looked washed out and it just leaves me with sore eyes.

~~~
sho_hn
The move to XCB has no impact on font rendering.

QWidget continues to use the same font rendering stack it has for many years,
i.e. fontconfig to interact with system fonts, harfbuzz for layout and
Xft/FreeType for rasterization.

Qt Quick 2 supports two different ways of rasterization. The default one is a
GL-based rasterizer using the distance field method. The other is FreeType.
You can switch between them on a per-item basis: [http://doc-snapshot.qt-
project.org/qt5-stable/qml-qtquick-te...](http://doc-snapshot.qt-
project.org/qt5-stable/qml-qtquick-text.html#renderType-prop)

Most likely your problem is that you're seeing the distance field render. The
advantage of the distance field renderer is that it produces more even results
in animated transformations (e.g. scaling text up or down over a number of
frames), but the disadvantage is rendering fidelity (particular preserving the
full detail of glyph shapes) and that it's just not consistent with other
things using FreeType alongside it.

In KDE Plasma Next, which extensively uses Qt Quick 2 for nearly all UI, we're
mostly using FreeType rasterization for that reason.

~~~
kungfoocoder
I was talking about the rendering that Qt-Creator uses inherently. If you know
of a way to control that, it would be great. The only option I see is under
Editor->Fonts as "Enable/Disable antialiasing" which isn't really helpful
since I use Ubuntu Mono, Monaco etc.

