Set dialog extension : QDialog « Qt « C++






Set dialog extension

  


#include <QtGui>

int main(int argc, char* argv[])
{
  QApplication app(argc, argv);
  QDialog dlg;
  QPushButton *btn = new QPushButton(QObject::tr("Expand/Collapse"),&dlg);

  btn->setCheckable(true);
  QVBoxLayout *lay = new QVBoxLayout(&dlg);
  lay->addWidget(btn);
  QLabel *ext = new QLabel(QObject::tr("Extension"));
  dlg.setExtension(ext);
  QObject::connect(btn, SIGNAL(toggled(bool)),&dlg, SLOT(showExtension(bool)));

  dlg.exec();
  return app.exec();
}

   
    
  








Related examples in the same category

1.All standard dialog
2.Config dialog
3.Find dialog
4.Find file dialog
5.extends QDialog
6.What is This Dialog
7.SIP Dialog Example
8.Order information dialog