MDI application with multiple Forms
-
@Nishanth I know. The thing is: all these widgets you are talking about are placed on some widget (parent widget), right? So, create a custom widget where you put all these widgets and then put this custom widget (parent widget) where you need it...
-
@jsulm I have placed a MDIarea into the main window and have tried to load the forms created inside the main window, but it was not working. Maybe I am missing something here.
Maybe I am not used to the terminology used here, so in Qt, UI forms are widgets, controls (textboxes, labels, etc..) are widgets?
I will look around for the solution, hopefully should be able to figure it out.
Thanks. -
@Nishanth
Well you could switch pages in stack widget with menus.However, it sounds like you a really hooked on MDI.
Note, though. they draw win 7 style on win 8/9.MDI can hold any widget, including forms.
The process is the same as inserting any other widget. -
@mrjj I am looking at MDI as it has a familiar feel to a lot of desktop applications I use, and meets the requirement. I just have to find a good tutorial or an example for what I am looking for in QT. I guess I am having beginners trouble with Qt. Couple of examples that with the documentations are implemented in a different way which I feel will not work for me. going through them I might just land on some thing that helps me.
Thanks. -
@Nishanth
Hi
Can you perhaps show an image of such a desktop program you use?
Might help us pinpoint exactly what you are after.
Most app i use is not MDI in the old sense where is document is
a floating window inside the app. but more like stacked widget where I switch views.Also check out
http://doc.qt.io/qt-5/qdockwidget.html -
Qt Creator for one is a MDI application.. I think there are a lot of apps which are an MDI and I have seen desktop application like the one I am trying to develop in Qt developed in c#, vb.net for windows platforms as well.
I have explained the requirement I am working on couple of times I really cannot be any more elaborate than I have been. Anyways thanks for your time. I am sure I will get to the solution.
If I get a working solution I will maybe post a sample code later on. Till then the search is on.
-
@Nishanth
Yep, its a multi view application but not a MDI app in the traditional sense.
You can split a Editor view and see 2 or more at same time but the views do not have
captions and decorations.
For such design, QSplitter can be used to divide the client area into view.
You can also use QDockWidgets which also can support multiple views
and/or support floating windows.
http://doc.qt.io/qt-5/qtwidgets-mainwindows-dockwidgets-example.html -
@mrjj I am looking at developing a MDI application in as you put it “traditional sense” which is probably very simple when compared to how other mdi application are from the requirement I have posted. Whatever suggestions you have suggested are pretty neat but it doesn’t really help me with my requirement.
Thank you for taking the time to post. -
@Nishanth
Ok, then MDI area is best fit. Its 100% traditional :)
You can use any form/widget for the inner content.
just use
QMdiSubWindow *addSubWindow(QWidget *widget, Qt::WindowFlags flags = Qt::WindowFlags());
to create new window where widget is your form object.