Example Using QGraphicsView Class
-
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.
@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? -
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 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.