crossplatform.ru

Здравствуйте, гость ( Вход | Регистрация )


  Ответ в QDialog и список окон
Введите ваше имя
Подтвердите код

Введите в поле код из 6 символов, отображенных в виде изображения. Если вы не можете прочитать код с изображения, нажмите на изображение для генерации нового кода.
 

Опции сообщения
 Включить смайлы?
Иконки сообщения
(Опционально)
                                
                                
  [ Без иконки ]
 


Последние 10 сообщений [ в обратном порядке ]
Andrewshkovskii Дата 22.4.2010, 12:36
  1. При создании и инициализации объекта класса QDialog
Цитата
QDialog::QDialog ( QWidget * parent = 0, Qt::WindowFlags f = 0 )
Constructs a dialog with parent parent.

A dialog is always a top-level widget, but if it has a parent, its default location is centered on top of the parent. It will also share the parent's taskbar entry.

The widget flags f are passed on to the QWidget constructor. If, for example, you don't want a What's This button in the title bar of the dialog, pass Qt::WindowTitleHint | Qt::WindowSystemMenuHint in f.

2. Установить родителя явно через
Цитата
void QWidget::setParent ( QWidget * parent )
Sets the parent of the widget to parent, and resets the window flags. The widget is moved to position (0, 0) in its new parent.

If the new parent widget is in a different window, the reparented widget and its children are appended to the end of the tab chain of the new parent widget, in the same internal order as before. If one of the moved widgets had keyboard focus, setParent() calls clearFocus() for that widget.

If the new parent widget is in the same window as the old parent, setting the parent doesn't change the tab order or keyboard focus.

If the "new" parent widget is the old parent widget, this function does nothing.
Note: The widget becomes invisible as part of changing its parent, even if it was previously visible. You must call show() to make the widget visible again.
Warning: It is very unlikely that you will ever need this function. If you have a widget that changes its content dynamically, it is far easier to use QStackedWidget.

neneTc Дата 22.4.2010, 12:34
  подскажите, пожалуйста, каким образом выставить родителя?
Andrewshkovskii Дата 22.4.2010, 12:28
  На панели задач т.е?поставь ему родителя. вроде так не должно.
neneTc Дата 22.4.2010, 12:22
  Каждое диалоговое окно, принадлежащее программе, отображается в списке окон как новое. Как не отображать диалоговое окно в списке окон?
Просмотр темы полностью (откроется в новом окне)
RSS Текстовая версия Сейчас: 29.3.2024, 0:06