Child dialog in a mail dialog.
-
So you are not searching to display a dialog window, you are trying to display different widgets depending on the user selection on the left panel bar. There are different ways to achieve it, one it could be to use a stack layout. As you mentioned, take the config dialog example and implement it in a similar way. Just create a set of top level widgets that are containers for your right side widgets and display the top level containers when needed.
-
is there any other way to do it except using stacked containers? any simpler way? the reason i am using dialog is because i could make use to editor to place other items on it. but in the example, all the other controls are created dynamically.
regards
D -
hello volker,
you are right but it did not solve the problem,
if i set it to
@pChildDlg = new ClildDialog(this);
pChildDlg->setModal(false);
pChildDlg->setWindowFlags(Qt::Widget);@and then call
@ QPoint p(this->window()->geometry().topLeft());
pChildDlg->move(p);
pChildDlg->show();@the widget is not shown.
but if i set it to
@ pChildDlg->setWindowFlags(Qt::Window);@the dialog is shown but has border on it, i used the property 'WindowTitleHint' to clear some of those. yes after setting above flag it does not go away, but when i move the main window it does not move with it. i want it to be stick to main window just like button and other dialogs.
is there any way to upload small source file here in the post, i dont see such option
i will try your suggestion soon and update the post soon
regards
D -
humm,
i just a read a post here
http://lists.trolltech.com/qt-interest/2002-12/msg01080.html
which says that
"Dialogs are ALWAYS toplevel widgets and are NEVER children of other widgets. If you specify a parent in a dialog it is only for positional reasions"i think this is my mistake, i am trying to use a dialog as a widget. i mean i am trying to make it children of other dialog.
-
[quote author="fluca1978" date="1323178212"]I'm totally unable to understand what you are trying to achieve...[/quote]
This is how I understood it:
- there should be a non-modal toplevel window (e.g. like a search/replace window of a word processor), so that both the main window and the popup are functional at the same time
- the second window is supposed to move together with the main window in case the latter is moved
The problem was that by using the wrong window flags, the popup was closed when clicking into the main window.