PDA

View Full Version : QWizard and banner pixmap



desch
2nd January 2008, 10:24
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

high_flyer
2nd January 2008, 10:35
Oh sorry, now I got what you mean.
Just add a QLabel (with the pixmap) to a wizard page.

desch
2nd January 2008, 10:44
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

high_flyer
2nd January 2008, 11:11
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.

desch
2nd January 2008, 11:59
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

high_flyer
2nd January 2008, 12:10
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 (http://doc.trolltech.com/4.3/qwizard.html#WizardPixmap-enum)?

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.

desch
2nd January 2008, 12:45
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 :rolleyes:

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

setPixmap(QWizard::BannerPixmap, QPixmap(":/images/banner.png"));

and you will see that is resizable...

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

high_flyer
2nd January 2008, 13:00
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.

desch
7th January 2008, 10:28
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