PDA

View Full Version : affine example and arthurwidgets problem



sincnarf
13th June 2007, 05:38
Does anybody here used affine and arthurwidgets previously and modified it so it supports image browsing and selection? My problem is most examples of arthurwidgets have predefined sets of images to load. The examples and demos of arthurwidgets I saw in the standard qt installation ( Qt\4.2.3\demos\affine ) does not have file menus that support loading of a new image. It only loads a picture of a rock in the sea or tux. Thanks!

marcel
13th June 2007, 20:39
But why don't you do it yourself?
It really isn't that hard...
Add a menu and an action for file opening - it should display a file open dialog, next take the image path, and load it with a QPixmap.

Next you should take the code in the XFormView constructor and put in a function you will call every time you load a new image.

You should use a the new image instead of the one from the qrc.

Practically you will have to make the form to adapt to the new image.

Regards

sincnarf
14th June 2007, 03:05
Thank you. But that's the problem with us Qt newbies... Can you give me codes?

wysota
23rd June 2007, 12:11
XFormView inherits QWidget and not QMainWindow so you can't add menus or toolbars to it.