Re: [Development] Issues with QFormBuilder - All properties modified & Invalid UI
On 25/10/2019 20:01, Hugo Slepicka wrote: Just a little follow up. Can this (invalid widget being generated by QFormBuilder.save ) be considered a Qt issue and fixed? It is for sure a bug, so please report it. I'm not sure how much love the widgets designer gets these days, though. The "all properties changed" is not a big deal, the incorrect form is. I think this _might_ be the reason for this exporting code in the widget exporter inside GammaRay: https://github.com/KDAB/GammaRay/blob/master/plugins/widgetinspector/uiextractor.cpp HTH, -- Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer KDAB (France) S.A.S., a KDAB Group company Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com KDAB - The Qt, C++ and OpenGL Experts smime.p7s Description: S/MIME Cryptographic Signature ___ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development
[Development] iOS Force Touch *almost* working
I am trying to get 3D Force Touch (finger pressure) working in my Qt App. I've been doing a lot of detective work and it almost works. I am going to share what I know to hopefully figure out what I am missing/what Qt is missing. There seems to be some support in QTabletEvent (https://doc.qt.io/qt-5/qtabletevent.html) for the Apple Pencil. (I've not tested that) But per this link and quote: https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/Adopting3DTouchOniPhone/ "In iOS 9, the UITouch class has two new properties to support custom implementation of 3D Touch in your app: force and maximumPossibleForce. For the first time on iOS devices, these properties let you detect and respond to touch pressure in the UIEvent objects your app receives." And, in the Apple Pencil support change: https://codereview.qt-project.org/c/qt/qtbase/+/193134/9/src/plugins/platforms/ios/quiview.mm We see the calculation I'd expect: touchPoint.pressure = uiTouch.force / uiTouch.maximumPossibleForce; So I made a simple app with QQuickItem subclass and override the event() with a static cast to QTabletEvent /// class TabletItem : public QQuickItem /* QQuickItem - QuickItem does not have tabletEvent() * QQuickWidget - QuickItem does not have tabletEvent() */ { Q_OBJECT public: TabletItem() {} bool event(QEvent *event) override { QTabletEvent *tabEvent = static_cast(event); if (tabEvent) { if (event->type() == QEvent::TabletPress) { qDebug() << "begin" << tabEvent->x() << tabEvent->y() << tabEvent->pressure(); } else if (event->type() == QEvent::TabletMove) { qDebug() << "update" << tabEvent->x() << tabEvent->y() << tabEvent->pressure(); } else if (event->type() == QEvent::TabletRelease) { qDebug() << "end" << tabEvent->x() << tabEvent->y() << tabEvent->pressure(); } qDebug() << "pressure" << tabEvent->pressure(); pressureChanged(tabEvent->pressure()); return true; } return false; } signals: void pressureChanged(double pressure); }; However at run time, here's what I get: pressure 5.3141e-314 pressure 5.31406e-314 pressure nan pressure 4.2483e-314 pressure 5.3141e-314 pressure 4.2483e-314 pressure 1.00938e-320 pressure 0 pressure 4.25599e-314 pressure 5.31408e-314 pressure 0 pressure 5.31406e-314 pressure 0 pressure 5.31406e-314 pressure 4.2483e-314 pressure 5.31406e-314 pressure 4.2483e-314 pressure 5.31406e-314 pressure 4.2483e-314 pressure 0 They are all 0, near zero, or division by zero. This seems so close to actually working. Does anyone know what might be wrong? I think maybe it's because it's looking for a pencil touch specifically. It seems that supportsPressure should be true for all iOS devices? ___ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development
Re: [Development] Issues with QFormBuilder - All properties modified & Invalid UI
In this case why keep it around? Keeping something that does not work only generates more confusion (like this post). Could at least a note at the official documentation be added stating that the method generates an invalid UI file and it must not be used? On Mon, Oct 28, 2019 at 1:07 AM Friedemann Kleint wrote: > Hi, > > >Just a little follow up. Can this (invalid widget being generated by > QFormBuilder.save ) be considered a Qt issue and fixed?The "all > properties changed" is not a big deal, the incorrect form is. > > This cannot realistically be supported, I am afraid. Simply changing all > properties from bottom to top may hit on a number of corner cases where > properties are not orthogonal and have interactions causing misbehavior. > > Regards, Friedemann > > -- > > Friedemann Kleint > The Qt Company GmbH > > ___ > Development mailing list > Development@qt-project.org > https://lists.qt-project.org/listinfo/development > ___ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development
[Development] HEADS UP : Qt 5.14 soft string freeze
Hi all, First beta releases from Qt 5.14 are already out so it is time to start keeping translatable strings as it is. Official string freeze will be in effect Monday 4th November 2019. br, Jani Heikkinen Release Manager ___ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development
Re: [Development] Issues with QFormBuilder - All properties modified & Invalid UI
Hi, >Just a little follow up. Can this (invalid widget being generated by QFormBuilder.save ) be considered a Qt issue and fixed?The "all properties changed" is not a big deal, the incorrect form is. This cannot realistically be supported, I am afraid. Simply changing all properties from bottom to top may hit on a number of corner cases where properties are not orthogonal and have interactions causing misbehavior. Regards, Friedemann -- Friedemann Kleint The Qt Company GmbH ___ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development