2D array into graphicview to create Objects from 2D-Array
-
wrote on 25 May 2020, 15:40 last edited by
can't go on i will look From Matrix to QImage and QPixmap on forum.. maybe that will help
-
Hi,
Do you mean you have a two dimensional array of chars that you want to build a grid with and that each of the cell of that grid shall contain the letter at that point of the array ?
-
Hi,
Do you mean you have a two dimensional array of chars that you want to build a grid with and that each of the cell of that grid shall contain the letter at that point of the array ?
wrote on 26 May 2020, 00:49 last edited byThis post is deleted! -
This post is deleted!
wrote on 26 May 2020, 01:13 last edited byThis post is deleted! -
This post is deleted!
wrote on 26 May 2020, 12:37 last edited by@projectbavaria 
-
wrote on 26 May 2020, 15:09 last edited by
-
From what you posted, there's nothing added to the scene and your view seems to be a local variable so unless it's in your main function body, it will be destroyed before you can even see it.
-
From what you posted, there's nothing added to the scene and your view seems to be a local variable so unless it's in your main function body, it will be destroyed before you can even see it.
wrote on 26 May 2020, 19:05 last edited by projectbavaria@SGaist but before i destroying it i have to handle that i want to save my array(inside there are my chars) as a QtPiximap -> after that i can show it in GraphisScene ?
-
Except that you are not using your array to draw anything. You are using a QBitArray which contains nothing to draw on a image that you then use as brush.
You should start by just drawing on that QImage properly and set it on a QLabel to see what it would look like. And once you have that working, come back to your QGraphicsView part.
-
Except that you are not using your array to draw anything. You are using a QBitArray which contains nothing to draw on a image that you then use as brush.
You should start by just drawing on that QImage properly and set it on a QLabel to see what it would look like. And once you have that working, come back to your QGraphicsView part.
wrote on 26 May 2020, 21:34 last edited by@SGaist okey i will try
14/14