diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2010-09-01 20:58:41 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2010-09-02 15:07:59 -0300 |
commit | 8f4246a522aa02c9e1d7e44ab6a18d13075d53b9 (patch) | |
tree | 34e4551d31960708e3850ca03f8231211dd3fcd3 /PySide/qpytextobject.h | |
parent | 94ce2814e9a3709ab7d60f3acee6576fe9476b1d (diff) |
Fix bug#125 - "QAbstractTextDocumentLayout.registerHandler apparently not working"
Added class QPyTextObject which inherits from QObject and QTextObjectInterface to
solve the issue with registerHandler, the same approach used by PyQt.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Renato Araújo <renato.filho@openbossa.org>
Diffstat (limited to 'PySide/qpytextobject.h')
-rw-r--r-- | PySide/qpytextobject.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/PySide/qpytextobject.h b/PySide/qpytextobject.h new file mode 100644 index 000000000..80c5b7ebd --- /dev/null +++ b/PySide/qpytextobject.h @@ -0,0 +1,16 @@ +#ifndef QPYTEXTOBJECT +#define QPYTEXTOBJECT + +#include <QObject> +#include <QTextObjectInterface> + +class QPyTextObject : public QObject, public QTextObjectInterface +{ + Q_OBJECT + Q_INTERFACES(QTextObjectInterface) +public: + QPyTextObject(QObject* parent = 0) : QObject(parent) {} + void drawObject(QPainter* painter, const QRectF& rect, QTextDocument* doc, int posInDocument, const QTextFormat& format ) = 0; + QSizeF intrinsicSize(QTextDocument* doc, int posInDocument, const QTextFormat& format ) = 0; +}; +#endif
\ No newline at end of file |