Results 1 to 4 of 4

Thread: affine example and arthurwidgets problem

  1. #1
    Join Date
    Apr 2007
    Posts
    117
    Thanks
    84
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default affine example and arthurwidgets problem

    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!

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: affine example and arthurwidgets problem

    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

  3. The following user says thank you to marcel for this useful post:

    sincnarf (4th October 2007)

  4. #3
    Join Date
    Apr 2007
    Posts
    117
    Thanks
    84
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: affine example and arthurwidgets problem

    Thank you. But that's the problem with us Qt newbies... Can you give me codes?

  5. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: affine example and arthurwidgets problem

    XFormView inherits QWidget and not QMainWindow so you can't add menus or toolbars to it.

  6. The following user says thank you to wysota for this useful post:

    sincnarf (4th October 2007)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.