PDA

View Full Version : Need help with the QGraphicsView and QGraphicsScene



ayanda83
29th March 2015, 09:44
Hi there, I am developing an application for designing pamphlets, something like in the attached picture. So I thought the best approach to this would be a QGaphicsView and QGraphicsScene. The scene is going to be as big as an A3 page but I want the view to focus on a certain portion of the scene until the user clicks on a button to move on to the next page. I want the scene to be subdivided into four A5 pages and the view’s job is to focus on one page at a time until the next A5 potion of the scene is requested. I need somebody to point me in the right direction and maybe if there is an easier way of doing this that I am not away of. And the final question is, "after all is done, is it then possible to print the QGraphicsScene as a pdf or a jpg because the ultimate goal of this application is to create a pamphlet that must be printed" .

thanking you in advance.

Added after 1 17 minutes:

Guys is there any other active Qt forum where one can ask questions besides this one?

d_stranz
30th March 2015, 02:56
Point you in the right direction

So what are you asking us to do? Design your entire application for you? You haven't actually asked any specific question as far as I can tell. The Qt documentation has plenty of information on how to use the graphics / view system, and there are numerous examples in the Qt distribution. Have you looked at them?

ayanda83
30th March 2015, 18:34
@d_stranz I did not say I wanted somebody to design the whole application for me. All I did was to give the way I plan on tackling this project and then I asked for input as to whether it's the correct approach or not, If not I asked if there is an easier way but I did not ask for somebody to design the whole application for me. Teach yourself to read the post carefully before you respond with useless text.

d_stranz
31st March 2015, 19:44
I did read your post carefully. What I read was a confused bunch of rambling about paper sizes and button clicking, along with a screen shot of what appears to be a commercial app that you apparently want to copy.

To answer your non-question: Of course you can use the Graphics / View architecture for this. You can also do it without using the Graphics / View architecture - e.g. QImage and the rest of the QWidget GUI. What's the best choice? As far as I can see, there is nothing in the screenshot that can't be easily done with QMainWindow, QSplitter, and a custom image display widget, one for each copy of the modified widget. There are ImageViewer, Scribble, and other examples in the Qt distribution that describe working with QImage.

wysota
1st April 2015, 19:40
If you tell us more about the application then we can try to suggest something. But with such a generic description I agree with d_stranz -- we can only give you a generic answer that there is more than one way to do it.