[SOLVED]Undocumented features



  • Hi folks!

    I've just stumbled on some undocumented signal: onCursorRectangleChanged
    This signal is used in the example of scrolling in the QML TextEdit element documentation section. But there are no mentions about the signal anywhere. And now I'm curious how many features QtQuick has which documentation knows nothing about? And how can I discover them?



  • bq. And how can I discover them?

    you will be surprised, but ... everything is in the SOURCES



  • Kxyu, can you point where QML sources are located? I've found nothing.



  • I couldn't understand! do you need to learn about signals and slots?



  • No, I want to know what signals can be emitted by a particular element, what methods and properties it has. I've experienced some troubles with attempt to locate onCursorRectangleChanged documentation. Why shouldn't I think there are another undocumented signals or methods or even properties in QML?



  • Some of these features might be kept for testing. I remember something similar being discussed somewhere. Also one cannot rely completely on undocumented API's as they might be removed in future versions.



  • Sure you are right. But this signal is used in the example provided by Trolls and I have a solid feel that it won't be thrown away in the future release. Also I use it for scrolling purpose but I'm not sure that I fully understand the signal meaning. And it is not so good feeling when you have a little control over the code...
    That is my point: if it can be retrieved by the public interface it should be documented.



  • [quote author="ixSci" date="1294083775"]
    That is my point: if it can be retrieved by the public interface it should be documented. [/quote]

    Yes, I agree with this.



  • [quote author="ixSci" date="1294075256"]Hi folks!

    I've just stumbled on some undocumented signal: onCursorRectangleChanged
    This signal is used in the example of scrolling in the QML TextEdit element documentation section. But there are no mentions about the signal anywhere. And now I'm curious how many features QtQuick has which documentation knows nothing about? And how can I discover them?[/quote]

    Hi,

    All properties in QML automatically have an associated on<PropertyName>Changed signal handler available from QML. These aren't individually documented, but http://doc.qt.nokia.com/4.7-snapshot/qml-extending-types.html#property-change-signals provides a brief description of the concept. It should probably be added to the language introduction as well, as the feature isn't specific to properties added from QML.

    Regards,
    Michael



  • Thanks Michael! Good link with a good explanation.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.