How to insert text to QTextEdit according to combo box CurrentText?
In an application I am creating I have a combo box with a list of items
and a QTextEdit (read only) below it.
I want to display certain text (it can be a plain text) according to which
option is selected. I mean to create a combo box where the user can choose
an option and a detailed description (in QTextEdit) of selected option.
How this can be achieved?
For now the only thing I had figured was using the Signal and Slot in
Designer and connecting combo box with QTextView and setting
currentTextChanged() - setText(). And it works nicely but it just sets the
text from Combo Box into the QTextView... and that is not the thing I
want.
I am using QtCreator 2.8.1 with Qt5.1.1 on Elementary OS Luna (Ubuntu
derivative, Linux).
No comments:
Post a Comment