Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QML SystemInfo - it exists already, but only seems to be part of the Neptune 3 UI



  • We just want to display some OS info in a dialog to be used by service, and users when reporting an issue.

    Yes, I could write a simple class in C++ to get the information and send it off to QML using QSysInfo, but the QML code ALREADY EXISTS!

    SystemInfo provides all we need, but it appears that it is only available from the Neptune 3 UI package? Is this something our commercial license does not include? What is the required import to use SystemInfo? Why is it not part of the standard, base, QML? Why isn't all this information just part of Qt.platform? That's where platform is getting its "os" value, right? (I sure hope so. Otherwise there is redundant code in the Qt/QML implementation.)

    No, we are not making a car, an entertainment system, or a game of any sort.

    Yes, I remain frustrated with what was a wonderful development platform. The focus of this is on accessing SystemInfo in QML, but why did Qt5 switch to returning a point, as in XY pair, for the angleDelta of a WheelEvent? It's a WHEEL! Like a scrollbar, it can have only one direction if you were to return a coordinate. Are you imagining dropping wheel controllers in at 45 degrees? And who decides on the precision to know what XY values to return? An angle delta is an angle delta. It is subject to the same interpretation no matter what the size or precision of the device may be. And it works for a wheel that is used to adjust say, BLOOD FLOW, where an XY pair is useless.

    How about QML documentation for AlignBaseline? Yes, it is defined in Qt, but skipped over in QML. And it is VERY useful when aligning text strings that use different font sizes. To this end, what happened to stretch and spacers in layouts? They exist in the Qt classes.

    Yes, blowing off steam. Please focus on the initial question, how to use SystemInfo in QML, or do I just rewrite what has already been written. Thanks.


  • Moderators

    @VFCraig
    the SystemInfo doc say where to get the values of the properties.
    You can create an object/method returning a QVariantMap containing alls the info you want. This shouldnt take longer than 10mins to implement.



  • @raven-worx So what you are saying is what I said in the first few lines of my post, that I have to write what has already been written, is already documented by Qt as existing, is a direct reflection of what already exists in C++ because Qt decided to wrap it up in a "special" Neptune UI package. Not that it does ANYTHING relative to 3D or provides ANY additional information beyond that in the C++ class, so it in no way justifies a "special" package.

    But sure, why not use C++ to do what QML fails to do. Or why not just use a Qt Python package if you want your UI development to be separate from your core. Sort of removes having to dance around the not complete javascript to add a bit of functionality.


Log in to reply