A similar question was posted on QtForums a while ago by somebody else and got no answer.
After some investigation I found that if QSvgWidget is displayed without QScrollArea then #Scheff's Cat 's answer is correct - QSvgRenderer::viewBox should be used.
However, if QSvgWidget is displayed as a viewport of QScrollArea - simple resizing of QSvgWidget has the same effect as zooming.
Related
I know this has been asked many times, and I have been searching for the answer in a lot of places but I can't seem to fix my code. Thank you for reading this because I'm going crazy here! First I had a different z-index problem with safari, than another with explorer, but now the z-index problem I'm having with mozila I can't fix in any way. I code in chrome, where it seems to work perfectly (for me it seems at least!)
I believe now it works more or less fine in most browsers but not on mozila. The idea of the page is to make (only with CSS because that's the only language supported by the website) a flipping book of several pages. I see some examples around of CSS only flipping cards (only one page), but not a book of more than one page. So I essentially overlap several "cards", in order to give this effect. You can see the demo from codepen here: pkrein/pen/qBOewem
Btw I do know this code is not as clean as it could be, but that's the way I figured to make a fuction like that works only with CSS, and I hope it will make sense for you.
Ok, so the matter is, the content inside the book pages is not "scrollable" on firefox. I guess this is indeed a z-index problem, because when I move any page outside the book, that is, from behind the rest of the content, it scrolls fine.
Let me know if I can give any more info that could help you understand my issue!
I figured a possible solution for this. It's not quite the solution for the problem itself but it's something that can make what I want to do work.
The problem was: (what I had to remove in order to make it work):
(1) The div #content-holder holding all the text inside the flap
(2) The div .preparation-text inside the .preparation (that's the text I want to scroll). That was a scrolling div (.preparation) inside a non-scrolling div (.preparation-text). I always add a scrolling div inside a non-scrolling div in order to hide the scrollbar, by adding a high padding-right to the inside div. I know I can use code to hide the scrollbar but it do not work in all browsers.
How I fixed:
(1) I just removed the #content-holedr divs, since it was not strictly necessary.
(2) I removed the .preparation-text and transformed .preparation into a scrolling div. Then I just covered the scrollbar with an image of the same size and colors as the background (a print of the layout).
I run a site using a liquid tri-column layout with a header. The layout runs nicely for more than a decade with all browsers I ever dared to try. It is based on absolute positioning in CSS. This page provides an example of the actual site.
Watching the page from my tablet I found that the right column overlaps the center matter. Further investigation using Firebug showed that once the center content reaches 360px width, the right margin of the div shrinks. Why is that? Since Firefox and Android render the same, I guess that this is something, which is actually supposed to be.
However, I tried to make virtue out of necessity and experimented setting min-width for body and content and made the body scroll overflow. The body actually scrolls, but the right column is positioned on the right edge of the viewport instead of the body element (Firefox). Is this intentional CSS standard?
Any ideas how to solve the presentation on small displays?
Thanks for your efforts,
– lars.
I pondered a while whether I should revoke the question or provide this self-answer. I decided for the self-answer since I wished some of the answers in related had been presented when I wrote the question.
First the 360px limit apparently is my own stupidity. There is a comment form, which refuses to shrink. It scrolled out of my view.
The issue of the wiered positioning had been solved by adding position:relative; to the body. The reason is explained in this question.
The overflow setting I used during experimenting is not necessary, since the default behaviour scrolls already. But using any overflow directive wrecks IE8.
So thanks a lot, the pool of answers finally had it all.
Hey guys, I'm using GWT for a data-driven web application, and I'm having issues with a CellTable embedded in a TabLayoutPanel. As you can see from the screenshot, the scroll bar for the table does not appear inside the bounds of the TabLayoutPanel. (You can see just a couple pixels of it on the right.) If I mouse over the TabLayoutPanel in the inspector, it properly shows the boundary ending at that black border on the right.
For some reason I haven't been able to determine, the TabLayoutPanelContent object is extending outside the bounds of its parent, the TabLayoutPanel. Has anyone run into an issue like this before? Or does anyone see an issue in the HTML/CSS that might suggest a solution? I'm sure it's something minor, but it's frustratingly difficult to find.
TIA!
The trick to finding a solution always seems to be just asking the question. :)
I had apparently set the width of one-too-many widgets to 100%. (Between the TabLayoutPanel, ScrollPanel, CellTable, etc.) I just removed all the width constraints, then slowly added them as needed until the UI was as desired.
I am trying to build an interactive map using an imagemap and jquery. I have it completed and it works great in FireFox but IE7 is causing some issues.
You can take a look at it here:
http://www.thecolumbianchicago.com/map/
In IE7 the title of the rollover is not getting the width set properly. Also once you rollover the tall building icon in the center, the background of the title disappears. I'm guessing its a CSS issue but I can't figure it out.
Anyone got any ideas?
Thanks
I figured it out, it was the javascript. I guess IE doesn't like .attr('width') and was returning a zero. I changed the code to have the width put into the image as rel="width" and used .attr('rel') and its all good now.
Don't mess with html image maps. You can use vector based interactive maps with jVectorMap.
Does anyone know what is causing the sprite rollover to jump around
It is I think more likely a photoshop question, but I am not completely sure.
I hope to get an answer here anyway, since I think most webdesigners/programmers problably worked with photoshop also.
This is what I want the rollover to do example 1
and this is my testpage (see the play button)
I made the sprite with spriteme.com
thanks, Richard
I do not see anything jumping around. However, when I first open the page the Play button is missing (its style is set to display: none;). When I click stop it appears, and then disappears when I click play. This is due to it's inline "display" style being set to block and none.
Is this your problem?
Note: I tested in Chrome and FF. I debugged the CSS states using Firebug.