سؤال

I need to pop up Qwidget with some properties functions from QMainWindow. This QWidget has to embed QFontDialog and QColorDialog.

I want it pop everything with single click, not via i.e. QFontComboBox... Is it possible? Can these dialogs be embedded into QWidget

هل كانت مفيدة؟

المحلول

You can add a QMdiArea in your QMainWindow and add any dialog as a subwindow. You can make subwindow maximized and frameless if you want.

QMdiSubWindow* w = ui->mdiArea->addSubWindow(new QColorDialog());
w->setWindowFlags(Qt::FramelessWindowHint);
w->showMaximized();
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top