I made a program using Qt 5.2.1 . Now when I launch the application and resize it, the scroll bars don't appear automatically.
I have tried adding the scroll area and then within it a widget ( and setting minimum size) but even that doesn't work.
Please tell me how to resolve this issue.
The problem is that you have not put a layout in the scroll area's interior. Also, the scroll area itself needs to be inside of a layout.
So you need at least 2 layouts to make this work.
Related
When i add splitters, it acts as a layout, but also allows to resize the widgets in runtime. So, for example, i managed to lay out my widgets in this way:
Therefore, i can resize my widgets in runtime. As i noticed, this function is also available in designer mode, but it doesn't work properly. I tried to hover over my splitter and drag it in designer mode, but it only replaces the entire widget.
That is how does my main window look like in QtDesigner. I haven't tried to code yet. The problem is, that even though i used to set a stretch factor, my widegt's look in designer mode and in runtime completely differ. They have another sizes.
So, what are the problems:
Firstly, i can't change my widgets sizes properly, using stretch factors. I don't know, i tried to change size policies, but i did't manage to see an effect. I have somehow changed size of the vertically oriented widgets, but when speak about horizontal orientation - stretch factor and size policy doesn't change anything at all.
Secondly, i can't move my splitter in designer mode. It's position is constant, by default, it's always somewhere in the middle.
Thirdly, i have bugs (i think so) with my widget sizes in designer mode. They differ with widget's sizes in runtime.
Question:
So, how can i change widget's sizes properly? Maybe there's a way of moving a splitter in designer mode - do newer versions of Qt have it? Currently i'm using Qt 5.9.9. Also, why these bugs, and are they bugs at all. Maybe i just should update my Qt to newer versions to get access to newer functionalities?
Comment: I'm not sure if stretch factors work with layout as they do with widgets. I'm using layouts exactly the same way i use widgets. My layout's wrong(maybe) use may have caused this problem. Anyways, i'm entirely new to Qt, and may not know something to understand it completely.
I'm very new to Qt and am having an issue regarding the window size after building the project. In the editor mode, I am placing a widget along with a pushbutton and textbox near the bottom. After I carefully align the pushbutton and textbox to be near the bottom of the window, I build the project. The resulting window shows a clear gap between the pushbutton/label and the bottom of the window:
I feel like I'm in a position where I'm so new to Qt that I can't properly debug it. Would anyone here have any idea of what's causing this gap? Padding issue? OS specific issue?
I appreciate any help!
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.
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.
I'm working on a Flex 4 application and I started customizing the interface with skins to give a whole new look.
So, I've created two scrollbar skins in Flash Catalyst (one horizontal, one vertical).
Its working great when I test the application through Catalyst so I took it and imported it on Flash Builder, copied the components and defined the new skins in my css file for the HScrollbar and VScrollbar.
The skin is working, all the buttons are ok. But, the scrollbar isnt resizing for some reason. It remains in the same height I've designed it to be regardless of the content it is bound to.
It scrolls the content in all the ways it should be but it doesnt resize and the thumb isnt getting all the way down.
Also I've noticed the following.
I have a custom component acting as a list. It extends Group and contains a Scroller. So at one place of the application the Scrollthumb is getting lower than on another place where the same custom list is used.
I also have to mention that this scroller works perfectly without a custom skin.
Anyone else having similar problems?
Okay, I know you posted this a while ago but I have been scouring the internet for days looking for why the scrollbar's thumb wasn't scaling like the default scrollbar.
There are a couple things to check, first is there a set height on your thumb's skin?
If not, and this is what I was overlooking, go to your scroller skin and at the point where you add the vertical and horizontal scrollbar set the "fixedThumbSize" property to false.
I suppose that your graphic elements are defined as every single part of the scrollbar (top arrow, bottom arrow, track, etc...): in this case you should check that the elements dimensions are not fixed... they should be in % to be able to change the dimensions based on the container.