0

I am working on a project to display a list of formulas in the ui. I snipped all the formulas in image form and saved them in .png format. Then I stored the name of the images and their path in a mysql database.

Here's an example of what my table looks like. example_table

I tried using listWidget but the formulas could be dragged across ui. So what would be a better way to display these formulas in an organized manner

Here's what it looks like right now using listWidgets: qt_ui

Atul
  • 11
  • 4
  • What do you mean by "optimum"? NB: the drag-drop functionality can be switched off via [setDragDropMode](https://doc.qt.io/qt-5/qabstractitemview.html#dragDropMode-prop). – ekhumoro Nov 01 '22 at 19:04
  • I should've used the word organized instead of optimum...The images are displayed randomly across the ui which doesn't look good at all – Atul Nov 02 '22 at 01:55
  • @ekhumoro thanks for the solution. Also can you suggest me a better way to display these images in organized manner. – Atul Nov 02 '22 at 03:39
  • It's unclear what you mean by "organised". What do you expect to see? I also don't understand why you are storing the images in a database. If you need to display arbitrary formulas, consider rendering them with e.g. [MathJax in a browser](https://stackoverflow.com/q/56760843/984421). – ekhumoro Nov 02 '22 at 12:17
  • Well I'm not storing the images in the database. It's the path that I'm storing in the database and iterating through those paths to display the images in my ui. What I actually want is to display these images so they look more aligned and not randomly dispersed. – Atul Nov 03 '22 at 05:34

0 Answers0