Set Stretch Factor for QSplitter : QSplitter « Qt « C++






Set Stretch Factor for QSplitter

  
#include <QtGui>

int main(int argc, char *argv[]){
  QApplication a(argc, argv);

  QSplitter s;
  QTextEdit *txtEdit = 0;
  for (int stretch = 1; stretch <= 5; stretch++) {
    txtEdit = new QTextEdit(&s);
    s.addWidget(txtEdit);
    s.setStretchFactor(s.indexOf(txtEdit), stretch);

  }
  s.show();

  return a.exec();
}

   
    
  








Related examples in the same category

1.Paint QSplitter
2.QSplitter, QListView and QTreeView