News for hackers. Stuff that matters.
Re:Qt 5.10 released by nikanj on Thursday December 07, 2017 @07:00AM (#15869329)
Qt used to be an absolutely awesome C++ framework. Then Nokia happened, and it turned into a weird Rapid Development Environment™ for Symbian®©.

Does anyone have up-to-date experience with Qt? It's quite clear Symbian is no longer the main target, but did they ever get back to treating C++ as a first-class citizen, or is it still all about QML?

Re:Qt 5.10 released by IshKebab on Thursday December 07, 2017 @08:01AM (#15869606)
Still all about QML. QtWidgets (C++) is well maintained but it's clear that they aren't really focusing on it.

I really wanted to like QML. It gets lots of things right, but it's just so unfinished, and a few things are really weird, like ... I'm pretty sure object IDs sit in a global namespace and can be accessed by any component. A child component can access its parent, which just screams spaghetti.

And as far as I know there's still no way to have text in a custom widget. I wanted to make a QML graph widget. The lines are easy... but labels. The API for that is still private.

Another example: I wanted a log window, like a compilation log or something. There's only one QML widget for that and the only operations you can do on it are append(string) and remove(offset, length). You can't remove the first line of text for example. I ended up having to keep a separate array of line lengths, it was a huge hack.

Re:Qt 5.10 released by majewsky on Thursday December 07, 2017 @07:06AM (#15869352)
Not sure what you're talking about. Qt 5 didn't remove anything that was there in Qt 4 [1], and added quite a few nice things like native Wayland support and more OpenGL integration.

Sure, the main development focus is on QML etc., but that's mostly because desktop is a more mature platform than mobile.

[1] Except for the QtWebkit to QtWebengine transition perhaps. I haven't followed that very closely.

Re:Qt 5.10 released by nikanj on Thursday December 07, 2017 @07:14AM (#15869395)
The main development focus is the very thing I was curious about. I remember Qt being slow to support new things eg. high dpi, unless you were using QML.

Getting the "feel" of a company's priorities can be hard, if you're not actively using their platform. I was hoping someone on HN had a somewhat realistic picture of where Qt is going these days.

Re:Qt 5.10 released by seba_dos1 on Thursday December 07, 2017 @07:25AM (#15869445)
Things have definitely accelerated since Nokia regarding desktop platforms. High DPI support has gone through a few iterations and is working pretty well now. Also, Qt is now using open governance model. Qt Quick is still important, but I wouldn't say it's the single, most important thing it used to be anymore.
Re:Qt 5.10 released by casione on Thursday December 07, 2017 @07:22AM (#15869431)
It looks to me like they're very underfunded and have completely lost focus. The high DPI "debacle" is a good proof of it.
Re:Qt 5.10 released by shaan7 on Friday December 08, 2017 @10:20AM (#15879216)
Sure /s. We have a Qt app with GUI completely written in Qt. Scales pixel perfect on HiDPI out of the box as long as you make sure to not hardcode pixel values.
Re:Qt 5.10 released by carlos22 on Thursday December 07, 2017 @07:21AM (#15869426)
Now the focus of QML is mostly embedded where it really shines. Desktop and mobile is still possible with qml.
Re:Qt 5.10 released by pjmlp on Thursday December 07, 2017 @09:32AM (#15870221)
All new APIs are done with focus of improving the QML experience.

For embedded and mobile deployments, QML is the only option.

If you try to use a common C++ widget dialog, you will get a tiny desktop like window, regardless of the platform.

Re:Qt 5.10 released by eql5 on Thursday December 07, 2017 @12:17PM (#15871828)
Ever heard of

    QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
(to be set before creating the QApplication instance).
Re:Qt 5.10 released by pjmlp on Thursday December 07, 2017 @01:40PM (#15872720)
How does it help, when displaying a tiny file selection dialog on an Android device?

https://bugreports.qt.io/browse/QTBUG-42491

Re:Qt 5.10 released by eql5 on Friday December 08, 2017 @03:41AM (#15877510)
These file dialogs are not for mobile! But it's easy to make your own ones, please see: https://gitlab.com/eql/EQL5-Android/blob/master/screenshots/...

The above is on an android tablet; but it displays perfectly fine on phones, too. Just see the sources of the above project for implementing such a dialog:

https://gitlab.com/eql/EQL5-Android/blob/master/examples/my/...

https://gitlab.com/eql/EQL5-Android/blob/master/examples/my/...

Re:Qt 5.10 released by pjmlp on Friday December 08, 2017 @04:31AM (#15877643)
Which proves you failed to understand my point, C++ Widgets don't work everywhere, only QML.
Re:Qt 5.10 released by eql5 on Friday December 08, 2017 @05:05AM (#15877747)
That depends on your screen size! But of course I would never use QWidgets on mobile, with the only exception of direct painting (using a QPainter on a plain QWidget).

QML is easier anyway, and gets better with every version...

Re:Qt 5.10 released by pjmlp on Friday December 08, 2017 @05:25AM (#15877813)
Not all Qt developers are happy to be forced to use QML, which again, was my point to start with.

C++ Widgets should be able to offer a mobile friendly version of themselves.

Which was actually a point that was discussed for the Qt roadmap at Qt World Summit 2017.

Re:Qt 5.10 released by eql5 on Friday December 08, 2017 @10:32AM (#15879331)
OK, I understand your point. Good luck, then!
Re:Qt 5.10 released by pjmlp on Saturday December 09, 2017 @02:22AM (#15884703)
Thanks, but actually I don't use Qt anymore, that bug and a few other ones in 5.4 lead me to use Java and C++/CX for the UI, with common business logic in C++, in a MVVM approach.

The approach of re-doing in QML standard UI components is not appealing.

Re:Qt 5.10 released by jhasse on Thursday December 07, 2017 @07:36AM (#15869492)
> native Wayland support

It's still pretty unusable though :/ The default for Qt apps is via Xwayland in Fedora for example.

Re:Qt 5.10 released by majewsky on Thursday December 07, 2017 @05:31PM (#15875001)
I'm using some KDE apps under Wayland (Sway, to be precise), and they're definitely not running under Xwayland (as confirmed by `xlsclients`). There is a lot of scaling confusion, but it's far from "unusable". Just not pretty.
Re:Qt 5.10 released by jhasse on Friday December 08, 2017 @02:23AM (#15877257)
Must have been some bug with my configuration then: There were scaling issues resulting in some buttons being unclickable.
Re:Qt 5.10 released by joezydeco on Thursday December 07, 2017 @11:53AM (#15871640)
Qt5 dropped the QWindowing Server for embedded platforms.
Re:Qt 5.10 released by dkersten on Thursday December 07, 2017 @07:37AM (#15869498)
I'm of a different opinion: that Qt was good, but became great with Nokia. QtQuick (with its hardware-accelerated scene-graph based rendering system for rich UI's with ultra smooth animation) is awesome and QML is a very nice and pleasant way of declaratively creating UI's. Sure, you'd want to minimise the use of javascript, but QML + C++ is a pleasant experience, in my opinion, and much nicer than QWidgets.
Re:Qt 5.10 released by distances on Thursday December 07, 2017 @08:26AM (#15869749)
I agree. Plus people tend to forget it was Nokia that relicensed Qt to LGPL, which was a massive gift for most developers. I really liked QML myself when I was using Qt, but even many of those who don't care about QML are likely enjoying the benefits of the more liberal license.
Re:Qt 5.10 released by ajuc on Thursday December 07, 2017 @10:38AM (#15870946)
I kinda like QML. I liked qt3 for desktop apps, and pyqt was pretty sweet, but qml frontend and C++ backend is even better.
Re:Qt 5.10 released by user5994461 on Thursday December 07, 2017 @06:50PM (#15875469)
I've been on Qt projects, it's all C++.

Never seen any QML, don't know why people think Qt is about QML and javascript.

Re:Qt 5.10 released by digi_owl on Thursday December 07, 2017 @11:49AM (#15871603)
My impression was that QML was already happening before Nokia got involved.
Re:Qt 5.10 released by seba_dos1 on Thursday December 07, 2017 @05:39PM (#15875054)
QML was heavily inspired by EFL's Edje and the QEdje project, which was started in the middle of 2008. Qt Kinetic was initially presented at the end of 2008, however, it was still pretty much widget-oriented (the closest you could get to QML's was to use QGraphicsWidget by yourself, like Plasma 1 did). Qt Declarative (later called Qt Quick), including QML, has been shown in May 2009, a year after the acquisition by Nokia (June 2008, announced in January).