prototypes.h Example File | Qt 4.8 (original) (raw)
script/defaultprototypes/prototypes.h
#ifndef PROTOTYPES_H #define PROTOTYPES_H
#include <QtCore/QObject> #include <QtScript/QScriptable>
class ListWidgetItemPrototype : public QObject, public QScriptable { Q_OBJECT Q_PROPERTY(QString text READ text WRITE setText) public: ListWidgetItemPrototype(QObject *parent = 0);
[QString](qstring.html) text() const;
void setText(const [QString](qstring.html) &text);public slots: QString toString() const; };
class ListWidgetPrototype : public QObject, public QScriptable { Q_OBJECT public: ListWidgetPrototype(QObject *parent = 0);
public slots: void addItem(const QString &text); void addItems(const QStringList &texts); void setBackgroundColor(const QString &colorName); };
#endif
© 2016 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.