Home > other >  How to realize the hyperlink function in qt program QTextEdit,
How to realize the hyperlink function in qt program QTextEdit,

Time:09-27

 similar to QQ, fly in the autumn of chat software, you can send text, can also send a file, the file will send completed, will be in the chat window, it says" open folder ", "open file" such as hyperlinks,,,, I want to achieve a similar window is now put on the window derived from QTextEdit controls GifTextEdit controls, and how to realize the hyperlinks?

CodePudding user response:

You also use QXMPP

CodePudding user response:

Is,

CodePudding user response:

The building Lord Ui can see looks? The native textedit very egg pain to deal with a lot of things, I recently doing dead loss

CodePudding user response:

I remember I realize the QLabel hyperlinks effect to implement in HTML code, then connect a signal to realize the function, estimate the text edit also no problem

CodePudding user response:

QXMPP usage, thanks.

CodePudding user response:

You may need to QTextBrowser or more powerful QWebView if you want to do it with textedit, should need textCursor and anchorAt.

CodePudding user response:

Is displayed, if can be embedded into the ie or its, it is very convenient. (click the link function, have to do is write a js calls) if use QTextBrowser to do, is very troublesome. And in general text editor. Provides a more limited functionality. A little more complicated, such as GIF, according to the font color can see income. Qq dazzle colour font. Is more troublesome. In analytic textedit document structure is needed to deal with.

CodePudding user response:

Brothers, you can change the head no, spent the past look over my eyes, I thought it was a person speaking