Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    Implementing a 14 lines x 60 columns Q[Plain]TextEdit

    General and Desktop
    2
    2
    461
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      fp615 last edited by

      I need to implement a input widget where the user can fill maximum 14 lines x 60 columns of text. The data will be printed on a form and this is the maximum allowed dimension available.

      I read some posts and there are some proposals but I did not find something really suitable. A QPlainTextEdit would be great but it works with paragraphs/blocks, and wordwrapping doesn't create a new block... also setting maximum blocks number isn't ok, since it deletes the first line to add a new line at the end...

      I may use 14 QLineEdit.... but if I need to add a line or delete a line I have to cut/paste... or add some buttons to automate some changes...

      or create a new widget from scratch trying to simulate a full editor...

      Any ideas?

      1 Reply Last reply Reply Quote 0
      • B
        Binary91 last edited by

        What about using a QTableWidget with editable items? That would be much easier to handle.
        In case of too less functinallity (hence you really need some functionallity of QLineEdit/QTextEdit that cannot be solved via QTableWidgetItem), you can still insert QLineEdits/QTextEdits into the table cells via setCellWidget.. Then you can easily add/insert/delete rows/columns without copy & paste...

        1 Reply Last reply Reply Quote 0
        • First post
          Last post