className

String className(object)

This function returns the object's class name as a string. (A suitable object can be obtained using the Object waitForObject(objectOrName) function or the Object findObject(objectName) function.) For objects that are created in test scripts, this is their actual type name. For widgets and other application objects, Squish tries to return the correct type name, and if that isn't possible, returns "Object", the name of Squish's generic object type, instead.

Differences in String typeName(object) results compared to String className(object)

For Ruby:

  • Squish::C -> C
  • Squish::D -> D
  • Squish::LC::Char -> char
  • Squish::LC::Int -> int
  • Squish::LC::Double -> double

For Perl:

  • char& -> char
  • bool& -> bool
  • double& -> double
  • C& -> C
  • D& -> D

There are no known differences in other scripting languages.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.

Search Results