diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-07-11 17:17:13 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-07-11 17:17:51 +0200 |
commit | 4dac45c9ee59ff6586d90d423654da91523ab679 (patch) | |
tree | cd4a4adf2cbc9e77bf86d2d11e71ec66afdf3be4 /src/widgets/widgets/qtextbrowser.h | |
parent | 078cd61751aeaa310d35a3d596a21a36004a1a0f (diff) | |
parent | f44850b5c3464cdda0ee9b1ee858d95f3ffaa3e2 (diff) |
Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake
Change-Id: I715b1d743d5f11560e7b3fbeb8fd64a5e5ddb277
Diffstat (limited to 'src/widgets/widgets/qtextbrowser.h')
-rw-r--r-- | src/widgets/widgets/qtextbrowser.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/widgets/widgets/qtextbrowser.h b/src/widgets/widgets/qtextbrowser.h index ea81256f50..33e5b3980c 100644 --- a/src/widgets/widgets/qtextbrowser.h +++ b/src/widgets/widgets/qtextbrowser.h @@ -55,6 +55,7 @@ class Q_WIDGETS_EXPORT QTextBrowser : public QTextEdit Q_OBJECT Q_PROPERTY(QUrl source READ source WRITE setSource) + Q_PROPERTY(QTextDocument::ResourceType sourceType READ sourceType) Q_OVERRIDE(bool modified SCRIPTABLE false) Q_OVERRIDE(bool readOnly DESIGNABLE false SCRIPTABLE false) Q_OVERRIDE(bool undoRedoEnabled DESIGNABLE false SCRIPTABLE false) @@ -67,6 +68,7 @@ public: virtual ~QTextBrowser(); QUrl source() const; + QTextDocument::ResourceType sourceType() const; QStringList searchPaths() const; void setSearchPaths(const QStringList &paths); @@ -88,7 +90,12 @@ public: void setOpenLinks(bool open); public Q_SLOTS: +#if QT_VERSION < QT_VERSION_CHECK(6,0,0) virtual void setSource(const QUrl &name); + void setSource(const QUrl &name, QTextDocument::ResourceType type); +#else + void setSource(const QUrl &name, QTextDocument::ResourceType type = QTextDocument::UnknownResource); +#endif virtual void backward(); virtual void forward(); virtual void home(); @@ -112,6 +119,10 @@ protected: virtual void focusOutEvent(QFocusEvent *ev) override; virtual bool focusNextPrevChild(bool next) override; virtual void paintEvent(QPaintEvent *e) override; +#if QT_VERSION >= QT_VERSION_CHECK(6,0,0) + virtual +#endif + void doSetSource(const QUrl &name, QTextDocument::ResourceType type = QTextDocument::UnknownResource); private: Q_DISABLE_COPY(QTextBrowser) |