i'm trying to make a chat application in QT . Is it possible to read data from the text browser of QT GUI(which shows conversations) so that i can maintain a chat history...?plz help..Thank You
Is it possible to read data from the text browser of QT GUI
4.4k Views Asked by kernel At
2
There are 2 best solutions below
Related Questions in QT
- C++ template using pointer and non pointer arguments in a QVector
- Using QPointer and QObject::connect with C++11
- qt How to style a QToolBar > QToolButton overflow button?
- Qt - Repeatedly write at beginning of file
- C++ Mongodb driver, not working
- deletion and cleanup of worker thread in Qt crashes
- How to drap item from QTableView to QPushButton?
- get image type from qimage
- C++ QT Getting part from QString
- How to connect a destroyed signal of C++ object from QML?
- How to get shader version from QOpenGLShader?
- Size of Qt QRadioButton able to get smaller, but not larger than default
- error WinSock.h has already been included Boost Windows Qt
- How to call a non-class member function with pointers as parameters with QtConcurrent::run?
- What is the difference between MinGW SEH and MinGW SJLJ?
Related Questions in DATAREADER
- assigning a string to a string variable throwing Arithmetic operation resulted in an overflow,
- Using SqlTransaction with SqlDataReader
- Test connection before get data with data reader
- Learning to use pandas datareader to plot Yahoo share price but it does not seem right
- How to speed up data access?
- How to retrieve file from HTTP server using libcurl (or another way)?
- Check if data reader has rows?
- Invalid attempt to call Read when reader is closed
- How to close DataReader in VB.NET?
- ComboBox control inside DataRepeater control does not correctly filled by data from database (MySQL server)
- Sql Select direclty from a DataReader
- Is there a way to check if column supports null values from datareader?
- Bind datagrid to datareader
- MYSQL C# There is already an open DataReader associated with this Connection which must be closed first
- How can you access a reader in another class in ASP.Net
Related Questions in QTEXTBROWSER
- Insert text in while(1) loop to texteditor in QT
- How to make QListWidget auto-format the Item's text
- How to to center selected text in QTextBrowser
- Dynamic update of QTextBrowser in a Qdialog from a file(that gets updated by another job)
- Set text on a QTextBrowser without changing the font/style
- make a auto adjustable QTextBrowser
- QTextBrowser - how to identify image from mouse click position
- How to append text in a QTextBrowser in QT?
- About QT5 Qprocess output in Ubuntu
- Running a python method or script clicking a html text link (Qtextbrowser)
- Sphinx Integration in Qt
- Not underlining hyperlink in QTextBrowser
- QTextBrowser not processing CSS properly
- Is it possible to read data from the text browser of QT GUI
- Right Click Context Menu for QTextBrowser
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
The
QTextBrowserinheritsQTextEdit, which works on aQTextDocument. The QTextDocument can be converted to (and saved as) HTML usingQTextDocument::toHtml():I advise you to append to a log file every time a new message comes in / goes out, so update the QTextBrowser and the file "in parallel", and not saving the entire chat history everytime a new message appears.
To do so, open the log file and manually write the open
<html>and<body>tags without closing them. Then append the chat log entries on the still opened file. On application exit (object destruction of the chat window or whatever), close the</body>and</html>tags and afterwards the file itself. This will result in a much better performance than saving the whole file for every change of the QTextBrowser widget.