Is Stacked Widget the only option
-
You should use QStackedWidget and save yourself a bunch of effort.
-
:).....but Chris.....Again I have to start from the scratch to use stackedwidget or I can somehow convert my ui into stackedwidget
-
Have you tried including DMMMenu.h in you Actual.cpp?
@
#include "../../DMM/Include/Actual.h
#include "../../DMM/Include/DMM.h // Is this the header file that contains DMMMenu.h?
#include "../../DMM/Include/DMMMenu.h
#include "ui_Actual.h"
@
This is a cyclic dependency wherein your DMMMenu needs to know Actual and your Actual needs to know DMMMenu.Well, your requirement rightfully fits with/requires "QStackedWidget":http://doc-snapshot.qt-project.org/4.8/qstackedwidget.html - hence would suggest you to go thru it and use it - it reduces lot of complexity and pretty straight forward and simple to use it as well.
-
yes the DMM.h is the one which contains dmmmenu definition.
Actually we have to use these screens everywhere frequently in different subdirs which are part of this project so...stackwidget will not create a problem?
-
No. You can use as many instances of widgets as you like in as many places as you like. Some of those instances you can place in a QStackedWidget,
-
Will stacked widget create any problem in memory allocation or take more space ?
-
listen to people, QStackedWidget is your friend
-
@infoctopus.....:).......Yeah I want to....but some of my colleagues think that QStackedWidget will affect system's memory....So just to be assure and stay with QStackedWidget I need to be clear at this point of view....so guys help me out in deciding....please!!!!
-
My requirement is....I am going to have four different components in my project with lots of screens in it each and many will interact with each other....Its like a gui we have in our mobile...you can go back to main menu then switch to some other....the only difference is I am having different modes on which the device will work.....
So what you say what shall be the approach to achieve this kinda functionality
-
pragati, you either have your widgets (for "screens") in memory all the time (regardless of using QStackedWidget) OR you create/delete that widgets dynamically. I suggest to start with QStackedWidget and see if memory consumption is acceptable. If not, then create/delete objects when needed / not needed.
-
:)
I am already facing a problem in connecting widgets.....I am able to go next screen from main menu but from that screen I am not able to come back again to main menu. It is not allowing me to create an instance of the main menu's class in the screen from which I have to go back
:( -
you can post a project illustrating the issue so people could help you in their little time
-
Yeah I will do .....thanx anyways!!!