0

Im writing a tool that simulates Turing machines.

Here, Ive got a transition table of a such a machine

enter image description here

When a cell is double-clicked, a little dialog pops up (which is a custom widget, derived from QFrame) and should allow editing the contens of a cell. A cell may contain several rules (those |q2, 3, R| and such) and I want that little dialog to show these. The thing is that a user should be able to add and remove rules. At first, I wanted to use QLabels for that, which is fine with the adding aspect, but how do I remove existing rules? I planned having the user select the rules and click "Remove" but do I make sure the entire rule (QLabel) is selected?

Or should I take a completely ddifferennt approach to removing? Like letting every label have an own checkbox?

I would like to keep it as simple as possible. For example, QTableWidget is too "fat" for this, I feel like

Drise
  • 4,310
  • 5
  • 41
  • 66
TeaOverflow
  • 2,468
  • 3
  • 28
  • 40

1 Answers1

2

You should use a QListWidget - this will allow multiple lines, multiple selection, without the cells or horizontal/vertical headers.

http://qt-project.org/doc/qt-4.8/qlistwidget.html

Eric Hulser
  • 3,912
  • 21
  • 20