How do I have multiple border images, ie some images have to be fixed size while the others have to stretch.
My form has to be dynamic, different fonts are used on different OS's, so I can't create one big image...
How do I have multiple border images, ie some images have to be fixed size while the others have to stretch.
My form has to be dynamic, different fonts are used on different OS's, so I can't create one big image...
Last edited by wysota; 24th February 2008 at 15:20. Reason: Posts merged
codeslicer (24th February 2008)
Wow, I guess that's why you're a guru
Thanks a lot =]
I guess I'll still use the functions setPlainMode() and setFancyMode() and based on that set and remove masks, etc.
How would I set masks on the border image though? And would the "stand" (See picture in previous post) be put in the border image, or should it be seperate? Thanks again
codeslicer (24th February 2008)
Ok, then how would I mask the border-image widget?
Mask the top level widget (window). Of course you need to calculate the mask first, but it shouldn't be hard.
codeslicer (24th February 2008)
I don't think this will work, because, the buttons at the bottom of the monitor will stretch. Take a look at that screenshot on page 2. But that's a nice idea, if I didn't have to worry about scaling, then that would have been the ideal solution.
I'm thinking of using QWidget->hide() on each of those image labels, what do you think, will that work?
Thanks for helping me out, my lack of explanation skills keeps requiring more and more solutions
You may use QStyle and make usage of polish() / unpolish() methods to set/unset masks etc.
It would be more flexible when you'll be adding more styles in future (u have all style stuff in single class & you don't have to remember about changes in lots of places in entire application code).
I'm using single style for skins effect that gets images path in constructor and styleplugin searches skins directory and creates an instance of the same style for different images set.
It causes that adding new skins doesn't require coding, just some painting job.
See GrEEn (Graphics Effects Environment)
http://sourceforge.net/project/platf...roup_id=232746
a qt-based plugins oriented MDI image processing application(contains also qt plugins like styles & imageformats).
codeslicer (25th February 2008)
Read again how border-image works. Pay special attention to the parameters. Read about border-width as well.
codeslicer (25th February 2008)
Yes, I read it. It's just that the buttons and stand will stretch to the right and left, horizontally. Oh well, the stretch probably won't be more than a few pixels.
To understand better, attached is the ui form + resources...
Please do not copy/use those images in your applications (Although I doubt you will need to)
Last edited by marcel; 27th February 2008 at 02:13. Reason: removed attachmets at user's request
*Bump*
Border image doesn't have a middle image that doesn't stretch right?
I think it does. But if it doesn't work, use background-image.
Bookmarks