Force widget resizing in Qt - qt

I'm writing an image viewer, and I'd like some behavior from Qt:
imagine the viewer displays the image in a 256x256 box. Now I want that ctrl+Z do a zoom + resizing of the window; ie. show the 2x zoomed image in a 512x512 box, how can I do that?
Also, imagine know the user gave a certain shape to my viewer, and that he presses F10, I want to change the layout to display the viewer in the same size (if possible, eg not overflowing the screen) and add additional controls under it, and resize the complete widget in a way that the viewer widget does

Maybe you could use the QWidget::minimumSize property to change the widget minimal size.
If the size of your zoomed image gets bigger than the screen, you might have to put your widget into a QScrollArea.

Related

JavaFX - imageview node only shows with window resize

I'm using JavaFX. When i add an imageview node to the stack pane and then run the application, I can only see the image after manually resizing the window (dragging the edge of the window with my mouse).
It will also show up if i setTranslateX or setTranslateY the image away from its original location. But if I want it to just stay there, I have to manually resize the window to see it. Has anyone encountered this? Is it a bug I just have to deal with?
Thanks

How to enable resizing of a window in Qt

I'm new to Qt and I'm trying to figure out a way to auto-resize in Qt. The goal is for the user to be able to drag the window to make it bigger and everything resizes to the size of the window. Does anyone have any tips?

Embedded google map on mobile devices, annoying button changing map size

I have trouble making an embedded google map work properly on mobile devices. It is within a div box and set to 100% height/width and works as inteded when not on mobile phones. On phones it adds a big square-shaped button with an arrow in it in the bottom right corner which consequently shrinks the map size in the div to about half. When I click the mysterious button, nothing happens. So, an annoying button with no function. When I touch the map, the button disappears and the div is filled though. Anyway to get rid of that button?

Why UIImageView moves from its original place (interface builder) during runtime?

I have placed 3 images into UIImageViews using xcode4 interface builder: background, and two pictures. Background image fills the whole visible area and it looks the same in interface builder, in simulator and on device. In addition, I'm placing another image at the very bottom (stick to) of visible area, and another one on top of it. Both looks as I want in interface builder. The problem is both bottom image and on top of bottom image moves approximately by 50 pixels up when running in simulator or iphone4 device. Interesting part is that background image fill whole visible area. I should note that I'm using UIInterfaceOrientationLandscapeRight orientation so the status bar in my orientation should appear on top but I have disabled it in plist, so I guess it's not related to this problem. Both of my problematic UIImageView's have mode "Bottom". Also, all of three images have #2x image twin. But why can see everything OK in interface builder and then some shift on simulator and device? Also, strange why background is not moved. Does anybody had the same problem?
Try hiding all elements in your nib. (status bar, tool bar, etc)
Make sure you have your springs adjust for your desired effect.
Hope this helps!

Resize image to fit window in Qt

I am using Qt to construct an application. My MainWindow consists of an image of a map which I would like to be resized to the fit the window. This means when the window gets smaller the image gets smaller and vice versa. When the user selects a point on that image I want to remove this feature. I am new to Qt and haven't been able to figure this out. I am using QGraphicsView for this.
QGraphicsView::fitInView

Resources