Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-11035

QFormBuilder::save has a big bug!

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 4.6.2
    • Tools: Designer
    • None
    • winvista vs2008sp1

    Description

      there is a big bug in QFormBuilder.

      if save a complexWidget(like QTextEdit ,QTableView etc) , it will save all children of the complexWidget as a sampleWidget(like qscrollbar widget etc).

      src:
      --------------------------------------------------------
      mywindow.h
      #include <QDialog>
      #include <QCloseEvent>
      class QVBoxLayout;
      class QLineEdit;
      class MyWindow:public QDialog
      {
      Q_OBJECT
      public:
      MyWindow(QWidget *parent = 0);

      protected:
      QLineEdit *le;
      QVBoxLayout *v1;

      void closeEvent ( QCloseEvent * event ) ;
      };

      ---------------------------------------------------------
      mywindow.cpp
      MyWindow::MyWindow(QWidget *parent )
      :QDialog(parent)
      {
      QTextEdit *te = new QTextEdit;
      v1 = new QVBoxLayout;

      v1->addWidget(te);
      this->setLayout(v1);
      }

      void MyWindow::closeEvent ( QCloseEvent * e )
      {
      QFormBuilder builder;

      QFile file("./myWndow.ui");
      file.open(QFile::WriteOnly);
      builder.save(&file,this);
      QDialog::closeEvent(e);
      }

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kleint Friedemann Kleint
            wangqizero wangqi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes