Unsolved layout resizing for loadingbar
-
Hi,,,can anybody pls help me to fix this issue
In Mainwindow.cpp i added this code
pLoadingView = new LoadingView();
layout()->addWidget(pLoadingView);
It shows loadingImage but its not showing when i minimize it ,,how to resize layout??...................................
-
pLoadingView
Is this your loadingImage bar ? Why do you want to separate windows for this ? Since you are using the QMainWIndow, can you use the statusBar at the bottom or using docking windows to achieve the same.
-
pLoadingView is a another class(widget class) ,,here i want this as global because we have to use it in another classes,,,
-
Not understood your last statement. Not sure where is the question of global. What I'm telling is that you place your status windows into dockWidgets instead of directly adding in to layout of QMainWindow.
-
@dheerendra said in layout resizing for loadingbar:
ockWid
i tell u clearly ,,,QMainWindow is one class & pLoadingView is another class
in pLoadingView class i added on GUI one gif.image (loading bar) ,,
In QMainwindow we setted central widget as splashScreen so we have to show pLoading class on QMainwindow but issue is gif.Image is showing on Qmainwindow( at the Centre )when it is in Maximize state only but when i minimize it,, gif. image is not showing at the middle -
Hi,
QMainWindow has a special layout that makes all the toolbar, dock widgets etc. to work so it's really not common to use its layout directly. It would likely make more sense to use the central widget for that.
-
here loading bar is showing at the centre but when i click on restore- down button its not showing at the centre
we already setted splashscreen class as a centralwidget ! -
The most simple way would likely be to use a QStackedWidget or position your spinner manually at the center of the QMainWindow.
-
spinner ia @ the center of the QMinWindow only
ui->label->setAlignment(Qt::AlignCenter);
i added this line but it doesnt work & to where we have to take(use) QStackedWidget?? i mean in mainwindow class or ploading class(spinner image) -
The stacked widget would be set as the central widget.
-
@SGaist
How to show 2 widgets at a time one is transparent (for front) & one is for background ?? -
@Dimple You can set the background widget as parent of the foreground widget.
-
Hi
already setted but how to display it at a time ??
can u please let me knw in code correctly -
@Dimple You show both widgets as usual (show()). Did you set the foreground widget as transparent?
-
yes setted foreground widget as transparent,,,now foreground is resizing but background widget is not resizing?