Example Using QGraphicsView Class
-
wrote on 25 Oct 2021, 12:56 last edited by
Hi,
I'm trying to build a dynamic a * a matrix where in each cell I'd like to have a icon like a red dot. When the user clicks on the dot within a cell a popup window will come up providing certain information. The matrix essentially shows nodes of machines. When clicking on a cell, I get ping results which coincide with the machine that sends the ping and the one that gets it. So the rows shows machines which got pinged and the columns show machines that sent the ping. Are there any examples to show how to build a matrix table using QGraphicsView? I can work on the details myself but I'm not sure where to start. If someone can give me a starting point here, that would be great!
Thanks.
-
Hi,
I'm trying to build a dynamic a * a matrix where in each cell I'd like to have a icon like a red dot. When the user clicks on the dot within a cell a popup window will come up providing certain information. The matrix essentially shows nodes of machines. When clicking on a cell, I get ping results which coincide with the machine that sends the ping and the one that gets it. So the rows shows machines which got pinged and the columns show machines that sent the ping. Are there any examples to show how to build a matrix table using QGraphicsView? I can work on the details myself but I'm not sure where to start. If someone can give me a starting point here, that would be great!
Thanks.
wrote on 25 Oct 2021, 13:28 last edited by@leinad said in Example Using QGraphicsView Class:
Are there any examples to show how to build a matrix table using QGraphicsView?
Why do you want to draw your matrix as
QGraphicsItem
?
What prevents you from using just aQTableView
/QTableWidget
with some custom item delegates in your rows or columns? -
wrote on 25 Oct 2021, 13:30 last edited by
I thought of that, but the managers want me to use QGraphicsItem. It was originally done in Java where they drew the matrix so they want a similar design.
-
I thought of that, but the managers want me to use QGraphicsItem. It was originally done in Java where they drew the matrix so they want a similar design.
-
I thought of that, but the managers want me to use QGraphicsItem. It was originally done in Java where they drew the matrix so they want a similar design.
hi
But do you need scrolling of the rows ?
While you can custom paint anything you like, its
harder to get scrolling working if its all painted. -
wrote on 25 Oct 2021, 18:50 last edited by
I can have hundreds of cells since each cell represents a ping between machines and can have hundreds of machines, so probably will need scroll bars if the matrix is larger than the view.
-
I can have hundreds of cells since each cell represents a ping between machines and can have hundreds of machines, so probably will need scroll bars if the matrix is larger than the view.
wrote on 25 Oct 2021, 19:36 last edited by
5/7