Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Implementing a 14 lines x 60 columns Q[Plain]TextEdit
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 574 Views 1 Watching
  • 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 Offline
    F Offline
    fp615
    wrote on last edited by
    #1

    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
    0
    • B Offline
      B Offline
      Binary91
      wrote on last edited by
      #2

      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
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved