May 9, 2011

nbortola nbortola
Lab Rat
2 posts

QCheckBox in a QTextEdit

 

Hello,how can I put in my QTextEdit a QCheckBox?is it possible?

Thank you for a reply,Nicola.

[EDIT: more meaningful topic, Volker]

3 replies

May 9, 2011

marko-a marko-a
Lab Rat
6 posts

Could you give us a few more details? How is this custom component supposed to look and react to user input? As far as I can tell you’re looking for a text-input component that has check-box on left/right side? Why not simply align QTextEdit with a QCheckBox and remove label from check-box? Based on your specific requirements you may decide to compose a custom component out of those two standard components.

May 9, 2011

nbortola nbortola
Lab Rat
2 posts

I got to create a sort of “add Friend”,I have x line with a text in my TextEdit and i would to put x CheckBox (one for line). (for me this is the simple solution)

For example:
aaaa CheckBox
bbbb CheckBox
cccc CheckBox

I only know the TextEdit,but I think there are a best solution for this problem.

May 9, 2011

Andre Andre
Robot Herder
6393 posts

So… why are you using a QTextEdit here? For displaying a list, there are far better [doc.qt.nokia.com] solutions [doc.qt.nokia.com] in Qt. Those make it easy to add a checkbox as well.

 
  ‹‹ [SOLVED] Cursor and image coordinates(problem with scaling)      QMessageBox on Linux fails to gain focus when shown for a second+ time on closeEvent ››

You must log in to post a reply. Not a member yet? Register here!