Results 1 to 9 of 9

Thread: QWizard and banner pixmap

  1. #1
    Join Date
    Jul 2006
    Posts
    37
    Thanks
    6
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default QWizard and banner pixmap

    Hello All,

    First Happy New Year at all !!!

    I would like to set a banner pixmap in QWizard and resize the wizard as possible.

    FYI If you insert a banner pixmap; you can't resize the wizard width; wizard has taken the width of the pixmap.

    How making the width of QWizard independant of the banner pixmap?

    Thanks to all

    David

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QWizard and banner pixmap

    Oh sorry, now I got what you mean.
    Just add a QLabel (with the pixmap) to a wizard page.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Jul 2006
    Posts
    37
    Thanks
    6
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: QWizard and banner pixmap

    Yes, that's a good idea but How you do that because :

    if you set a title with

    setTitle("my title");
    setSubTitle("my subtitle");

    you can't add a label on this place where you had set title and sub title

    it seems this place is not so easy to modify

    and setting a QLabel in this place seems not possible

    David

  4. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QWizard and banner pixmap

    are you sure you read the docs of QWizard?
    If you don't have a spacial case, then it is very likely QWizard has what you need out if the box, of you just read the docs.
    Otherwise, explain what it is you want to achieve.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  5. #5
    Join Date
    Jul 2006
    Posts
    37
    Thanks
    6
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: QWizard and banner pixmap

    Could you just mention which part of doc I have to read

    because the aim is to use the system provided by QWizard like this:

    Wizards consist of a sequence of QWizardPages. At any time, only one page is shown. A page has the following attributes:
    A title.
    A subTitle.
    A set of pixmaps, which may or may not be honored, depending on the wizard's style:
    WatermarkPixmap (used by ClassicStyle and ModernStyle)
    BannerPixmap (used by ModernStyle)
    LogoPixmap (used by ClassicStyle and ModernStyle)
    BackgroundPixmap (used by MacStyle)


    using this is very simple ; my question is just to know how to resize the wizard when you set the bannerPixmap

    If there is no simple way ; I will design a Widget in Qt designer and set it on the top for all QWizardPages

    David

  6. #6
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QWizard and banner pixmap

    Could you just mention which part of doc I have to read
    All of it, its not THAT much!
    And you might find examples and ideas and features you wouldn't know about if you don't read, that might help you to better design your code, and better utilize QWizard to your needs.
    my question is just to know how to resize the wizard when you set the bannerPixmap
    The wizard should allow you a resize of the page - have a look at the docs what the banner pixmap is.
    Are you sure you mean the banner pixmap?

    And again, you can make custom pages, to look any way you want them too, and you can use those in your wizard, instead of the standard ones.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  7. #7
    Join Date
    Jul 2006
    Posts
    37
    Thanks
    6
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: QWizard and banner pixmap

    And you might find examples and ideas and features you wouldn't know about if you don't read, that might help you to better design your code, and better utilize QWizard to your needs.
    Don't worry, I 've read everything since a long time ; and tested all examples that Trolltech provides

    If I made a post, that's mean I have no explicit solution. I don't want to disturb anybody if I can find the solution myself.

    Ok, take the example "class Wizard" in example, in dialogs

    try to launch it and try to resize the "ClassInfoPage": it's not possible ...

    comment the
    Qt Code:
    1. setPixmap(QWizard::BannerPixmap, QPixmap(":/images/banner.png"));
    To copy to clipboard, switch view to plain text mode 

    and you will see that is resizable...

    Now if there is someting I've missed, tell me, and I will code for that
    Thanks

  8. #8
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QWizard and banner pixmap

    Don't worry, I 've read everything since a long time ; and tested all examples that Trolltech provides
    You could just said "yes I did" when I first asked.
    If I made a post, that's mean I have no explicit solution. I don't want to disturb anybody if I can find the solution myself.
    Well, that is very good.
    Unfortunately not that many here do that, so I wanted to make sure you did.
    Ok, take the example "class Wizard" in example
    At the moment I just don't have the time to run it.
    But from what you said, it sounds like an issue with a layout (but I can't confirm it at the moment), that once an image is set, the layout gets "locked" due to the fixed size of the pixmap.
    So that could be one place to look.
    Another is try playing with the QWizard/page object size hint, and size policies.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  9. #9
    Join Date
    Jul 2006
    Posts
    37
    Thanks
    6
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: QWizard and banner pixmap

    I have just received this answer for the question asked last week from Trolltech :

    I am not sure why adding the banner locks the size, I can't see why it should. I have created a suggestion that this restriction be removed.

    I have created task 193369 for our development team.
    You can use this ID to track the status of this task online:

    http://www.trolltech.com/developer/task-tracker

    I also created a simple patch to qt that implements this change, you are welcome to use it if you find it useful.



    just to notify that the task 193369 doesn't exist for the moment

    that's all

    David
    Attached Files Attached Files

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.