Qt: How to handle forms? - qt

I'm creating an application in Qt (Nokia SDK) which should hold a login screen, main menu screen, etc....
But what is the best way to jump back and forward on these screens?
I have recently looked at Stacked Widget, and it seems like that could solve my case, but it has some kind of margin on itself, that makes it look weird. (Makes the widget not fill the entire screen)
Any suggestions?
Thanks in advance!

if you are using a layout, select it and in properties, set margin values to 0

QStackedWidget doesn't have any margins. You should check if you are using layouts with margins. Usually you will have layout for each page of stacked widget.

Related

How to move a QPushButton inside gridLayout?

I have just tried a simple thing, in designer I created one push button, inside grid layout. The problem is geometry option got disabled in Property box, and I am not able to change the cordinates. In this situation how should I move the push button from its original place if required?
Can somebody help me to achieve this??
You can't move or resize a widget inside a layout because its position and its size are managed by the layout. If you want to manage its geometry yourself, do not use a layout.
Qt layouts are designed to help you make scalable user interfaces. For this, moving or resizing the button is usually done by the layout using sizeHint() and sizePolicy().
I would suggest reading up on how to use layouts and the use of spacers, as this will impact the location and size of your button.
Well I found a solution to that
Break the Layout, arrange the widgets and then set the layout

What happens to the Bottom Layout Guide when an InputView is displayed (i.e. keyboard)

So everyone loves this new Layout semantics in storyboard, it's dynamic in a way it adapts at runtime when we're inside a UINavigationController for example.
Now what about inputViews? I know inputViews are NOT part of my view, but wouldn't it make sense to affect the bottom layout guide of the containing view when a keyboard is displayed?
I mean, I've seen several coding solutions to this issue, but only one affectively takes advantage of the bottom layout guide (the others are deprecated or plain simple wrong approaches), but even that one sounds hard-wacky-coding and naturally it doesn't animate.
Is there a way to tell the view to adjust the bottom layout guide for input views automatically? I mean in storyboard? or do we need to do this sucky code let every time we use a keyboard in our application?
If the Keyboard appearing animated:YES would affect the bottom layout guide in it's progress we'd have yet another apple-is-so-cool-they-make-all-the-hard-work-for-us-while-enforcing-their-user-interface-guidelines....aff that was long :)

Scroll Bar in QStackedWidget in qt

I am using Qt Designer and I have a QStackedWidget. On one of the pages the data exceeds the size limit of the page. I added a Vertical Scroll Bar but it is not working when I run the application. Do I have to write any code for it. Please someone help with this.
Thank You.
Put your QStackedWidget into QScrollArea. In general, if you want something to be scrollable, you put it into QScrollArea.

Is there a way to use space between buttons in landscape

After much digging I've realised there is no Qt-way to use 3 middle buttons in landscape mode in S50v5, however I don't like to waste this precious space. I've tried to place my widgets there but menu bar is on top and widgets aren't visible.
Is there any way to utilise this space without using native Symbian APIs?
Controlling the stock softkeys in Qt is a pain. The strategy I have used is to make the QMainWindow full-screen with showFullScreen() which allows you to use the softkey space yourself. You will have to make sure any widgets you create are ultimately parents of the main window, and be mindful of this bug when creating pop-ups.

Qt Tab widget that wraps its menu bar

When the menu of a QTabWidget grows beyond its width, the default behaviour is to turn the tab menu into a horizontaly scrollable list. What I'd prefer is to wrap the menu round so you now have two rows of tabs. This style is used on some Windows dialogs. I can't find any way to do this though.
Is anyone aware of a trick or option to allow this kind of layout?
This option is currently not available for QTabWidget. Perhaps you could simulate this behavior using a few QTabBars?
There is an outstanding request for this on Qt's bug tracker but no progress on it yet. Perhaps somebody knows of another component/solution.
Flow layout does what you need, but then you will have to also make your own "tab widget" http://doc.trolltech.com/4.7/layouts-flowlayout.html

Resources