Crashing when changing currentIndex of stackedWidget...
-
About the spacers: set an appropriate minimum width (1px).
About the progress bar: Not sure what's going on there. I've tried it with a horizontal layout, and as soon as I set the visiblity of the progress bar to false, there is no space left but the other objects in the layout take up the space. -
About the separators: seemed like a qt bug, i reloaded the pixmaps and everything is ok..
About the progressbar: well see how it is in the designer:!http://i.imgur.com/pgK1e.png(designer)!
what do you suggest me about it?
And one more.. as you can see in this screenshot :
!http://i.imgur.com/8pJRu.png(screen)!the start converting and output format and combox is not in the middle of the listwidget.. in order to do that i should had the listwidget and these 3 widgets in a vertical layout.. but this can't happen because the listwidget is already in a layout with the buttons ( add,addfolder etc )... any ideas?
Thank you, really thank you for answering until now.. You really helped me understand some things :)
-
To center the button/label/combobox under the view, use a QGridLayout with bottom right cell empty. Top left is the view, top right the vertically aligned buttons and bottom left the horizontally aligned button/label/combobox.
Please elaborate on the progressbar issue. I don't see what's wrong with it.
-
i am on another computer right now.. i will see what you said about the grid layout..
for the progressbar look:
On starting programm the windows looks like this
!http://i.imgur.com/m1dnx.png(1)!the programm is a converter.. when you convert for example a video it shows a progressbar
!http://i.imgur.com/uizKE.png(1)!and when finished it hides the progressbar
!http://i.imgur.com/j443P.png(3)!but you can see that an ugly space created there.. why is that happening.. you can see my designer here do you have any suggestion?
!http://i.imgur.com/l3J2K.png(4)! -
Is the topmost layout a QVBoxLayout (vertical layout) where the progressbar is one cell (the third from top, after the toolbuttons and the view-sidebuttons-layout)? If so, then it should actually work. I've created a similar situation for testing and there is no space left when hiding the progressbar.
-
I am just dump :)
i wasn't hiding the progressbar but i was using QGraphicsOpacityEffect to set the opacity to 0 with a cool animation.. but when the opacity was 0 i was forgotting to call ->hide();i have solved any of my previous problems, but i want to question one last thing and i am ready, look..
This is the window in the designer:
!http://i.imgur.com/lw1kT.png(1)!And this is my mainwindows on action ( the arrows were added after the screenshot was taken ):
!http://i.imgur.com/aT50f.png(2)!Do you see that empty space? I want the show errors buttons hidden , and visible only when there was an error at conversion of 1 file ( as said the programm is a converter )..
Well i can't hide the whole layout which inside there are a horizonal space and the show erros button because it says that u can't hide a horizontal spacer.. What the hek? What i am supposed to do for this?
-
It doesn't work when just hiding the show-errors-button? Normally horizontal spacers shouldn't have a significant minimal height and thus the whole row should collapse horizontally to a few pixels (e.g. top+bottom margin of the layout).
Just a workaround idea: Why not place the button in the bottom right cell of the grid layout?
-
Not it doesn't work when just hiding the show-errors-button..
and i cannot put it in the grid cause the grid is a stackedwidget.. i want the show erros buttons to be visible regardless the page of stacked widget..my workaround idea is to set the height of the spacer to 0...
now it seems a little better :)height=20
!http://i.imgur.com/ckofX.png(20)!height=0
!http://i.imgur.com/LxW8z.png(0)! -
Xmm and how about adding a widget from code?
I mean i have all this widgets layouted in my designer.. what about if i have created a widget in my code and i wanted to add to the window?yes there is a reason why i created it by code..
from a quick think i thought of making an empty stackedwidget ( that is layouted properly in the designer ), and then via code say something like ui->stackedwidget->addwidget(blabla).. but there isn't an addwidget function.. any ideas?
-
Leon, look into widget promotion for that. Insert the closest base class of your custom widget into your layout, and promote it to the real widget using the right-click menu -> promote... Alternatively: create a Qt Designer plugin for your custom widget. The latter is probably only worth-while for widgets that you expect to use regulary from designer.