Details
-
Bug
-
Resolution: Won't Do
-
P4: Low
-
4.5.0, 4.5.1, 4.5.2, 4.5.3, 4.6.0, 4.8.2, 5.5.0
-
Mac os x / Qt 4.6, but i'm sure it affect others OS & Qt versions.
Description
Promoting QDockWidget in designer result to empty dock (contents widget is overwritten by a uic generated widget contents).
If the dock is promoted, it should not create a default content widget (and should not allow widget dropping in it).
Here is the generated file for my main window having a dock promoted as MyDock :
/******************************************************************************** ** Form generated from reading UI file 'MyForm.ui' ** ** Created: Wed Dec 16 15:14:36 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ #ifndef UI_MYFORM_H #define UI_MYFORM_H #include <QtCore/QVariant> #include <QtGui/QAction> #include <QtGui/QApplication> #include <QtGui/QButtonGroup> #include <QtGui/QComboBox> #include <QtGui/QDoubleSpinBox> #include <QtGui/QFontComboBox> #include <QtGui/QFormLayout> #include <QtGui/QFrame> #include <QtGui/QHeaderView> #include <QtGui/QLabel> #include <QtGui/QListWidget> #include <QtGui/QMainWindow> #include <QtGui/QPushButton> #include <QtGui/QTabWidget> #include <QtGui/QTextEdit> #include <QtGui/QVBoxLayout> #include <QtGui/QWidget> #include "MyDock.h" QT_BEGIN_NAMESPACE class Ui_MyForm { public: QWidget *centralwidget; QVBoxLayout *verticalLayout; QTabWidget *tabWidget; QWidget *tab; QFormLayout *formLayout; QPushButton *pushButton; QListWidget *listWidget; QFontComboBox *fontComboBox; QComboBox *comboBox; QLabel *label_4; QFrame *line; QLabel *label; QLabel *label_2; QLabel *label_3; QFrame *line_2; QWidget *tab_2; QFormLayout *formLayout_2; QComboBox *comboBox_2; QLabel *label_5; QListWidget *listWidget_2; QLabel *label_6; QPushButton *pushButton_2; QLabel *label_7; QDoubleSpinBox *doubleSpinBox; QTextEdit *textEdit; MyDock *dockWidget; QWidget *dockWidgetContents; void setupUi(QMainWindow *MyForm) { if (MyForm->objectName().isEmpty()) MyForm->setObjectName(QString::fromUtf8("MyForm")); MyForm->resize(672, 405); centralwidget = new QWidget(MyForm); centralwidget->setObjectName(QString::fromUtf8("centralwidget")); verticalLayout = new QVBoxLayout(centralwidget); verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); tabWidget = new QTabWidget(centralwidget); tabWidget->setObjectName(QString::fromUtf8("tabWidget")); tab = new QWidget(); tab->setObjectName(QString::fromUtf8("tab")); formLayout = new QFormLayout(tab); formLayout->setObjectName(QString::fromUtf8("formLayout")); pushButton = new QPushButton(tab); pushButton->setObjectName(QString::fromUtf8("pushButton")); formLayout->setWidget(0, QFormLayout::LabelRole, pushButton); listWidget = new QListWidget(tab); new QListWidgetItem(listWidget); new QListWidgetItem(listWidget); listWidget->setObjectName(QString::fromUtf8("listWidget")); formLayout->setWidget(1, QFormLayout::FieldRole, listWidget); fontComboBox = new QFontComboBox(tab); fontComboBox->setObjectName(QString::fromUtf8("fontComboBox")); formLayout->setWidget(2, QFormLayout::SpanningRole, fontComboBox); comboBox = new QComboBox(tab); comboBox->setObjectName(QString::fromUtf8("comboBox")); formLayout->setWidget(7, QFormLayout::LabelRole, comboBox); label_4 = new QLabel(tab); label_4->setObjectName(QString::fromUtf8("label_4")); formLayout->setWidget(8, QFormLayout::FieldRole, label_4); line = new QFrame(tab); line->setObjectName(QString::fromUtf8("line")); line->setFrameShape(QFrame::HLine); line->setFrameShadow(QFrame::Sunken); formLayout->setWidget(9, QFormLayout::FieldRole, line); label = new QLabel(tab); label->setObjectName(QString::fromUtf8("label")); formLayout->setWidget(10, QFormLayout::LabelRole, label); label_2 = new QLabel(tab); label_2->setObjectName(QString::fromUtf8("label_2")); formLayout->setWidget(10, QFormLayout::FieldRole, label_2); label_3 = new QLabel(tab); label_3->setObjectName(QString::fromUtf8("label_3")); formLayout->setWidget(11, QFormLayout::FieldRole, label_3); line_2 = new QFrame(tab); line_2->setObjectName(QString::fromUtf8("line_2")); line_2->setFrameShape(QFrame::VLine); line_2->setFrameShadow(QFrame::Sunken); formLayout->setWidget(12, QFormLayout::FieldRole, line_2); tabWidget->addTab(tab, QString()); tab_2 = new QWidget(); tab_2->setObjectName(QString::fromUtf8("tab_2")); formLayout_2 = new QFormLayout(tab_2); formLayout_2->setObjectName(QString::fromUtf8("formLayout_2")); comboBox_2 = new QComboBox(tab_2); comboBox_2->setObjectName(QString::fromUtf8("comboBox_2")); formLayout_2->setWidget(0, QFormLayout::SpanningRole, comboBox_2); label_5 = new QLabel(tab_2); label_5->setObjectName(QString::fromUtf8("label_5")); formLayout_2->setWidget(1, QFormLayout::FieldRole, label_5); listWidget_2 = new QListWidget(tab_2); listWidget_2->setObjectName(QString::fromUtf8("listWidget_2")); formLayout_2->setWidget(2, QFormLayout::FieldRole, listWidget_2); label_6 = new QLabel(tab_2); label_6->setObjectName(QString::fromUtf8("label_6")); formLayout_2->setWidget(3, QFormLayout::LabelRole, label_6); pushButton_2 = new QPushButton(tab_2); pushButton_2->setObjectName(QString::fromUtf8("pushButton_2")); formLayout_2->setWidget(3, QFormLayout::FieldRole, pushButton_2); label_7 = new QLabel(tab_2); label_7->setObjectName(QString::fromUtf8("label_7")); formLayout_2->setWidget(4, QFormLayout::LabelRole, label_7); doubleSpinBox = new QDoubleSpinBox(tab_2); doubleSpinBox->setObjectName(QString::fromUtf8("doubleSpinBox")); formLayout_2->setWidget(5, QFormLayout::SpanningRole, doubleSpinBox); textEdit = new QTextEdit(tab_2); textEdit->setObjectName(QString::fromUtf8("textEdit")); formLayout_2->setWidget(6, QFormLayout::FieldRole, textEdit); tabWidget->addTab(tab_2, QString()); verticalLayout->addWidget(tabWidget); MyForm->setCentralWidget(centralwidget); dockWidget = new MyDock(MyForm); dockWidget->setObjectName(QString::fromUtf8("dockWidget")); dockWidgetContents = new QWidget(); dockWidgetContents->setObjectName(QString::fromUtf8("dockWidgetContents")); dockWidget->setWidget(dockWidgetContents); MyForm->addDockWidget(static_cast<Qt::DockWidgetArea>(1), dockWidget); retranslateUi(MyForm); tabWidget->setCurrentIndex(0); QMetaObject::connectSlotsByName(MyForm); } // setupUi void retranslateUi(QMainWindow *MyForm) { MyForm->setWindowTitle(QApplication::translate("MyForm", "MyForm", 0, QApplication::UnicodeUTF8)); pushButton->setText(QApplication::translate("MyForm", "PushButton", 0, QApplication::UnicodeUTF8)); const bool __sortingEnabled = listWidget->isSortingEnabled(); listWidget->setSortingEnabled(false); QListWidgetItem *___qlistwidgetitem = listWidget->item(0); ___qlistwidgetitem->setText(QApplication::translate("MyForm", "Just click in inputs widget ", 0, QApplication::UnicodeUTF8)); QListWidgetItem *___qlistwidgetitem1 = listWidget->item(1); ___qlistwidgetitem1->setText(QApplication::translate("MyForm", "and/or change tab to see the bug.", 0, QApplication::UnicodeUTF8)); listWidget->setSortingEnabled(__sortingEnabled); label_4->setText(QApplication::translate("MyForm", "TextLabel", 0, QApplication::UnicodeUTF8)); label->setText(QApplication::translate("MyForm", "TextLabel", 0, QApplication::UnicodeUTF8)); label_2->setText(QApplication::translate("MyForm", "TextLabel", 0, QApplication::UnicodeUTF8)); label_3->setText(QApplication::translate("MyForm", "TextLabel", 0, QApplication::UnicodeUTF8)); tabWidget->setTabText(tabWidget->indexOf(tab), QApplication::translate("MyForm", "Tab 1", 0, QApplication::UnicodeUTF8)); label_5->setText(QApplication::translate("MyForm", "TextLabel", 0, QApplication::UnicodeUTF8)); label_6->setText(QApplication::translate("MyForm", "TextLabel", 0, QApplication::UnicodeUTF8)); pushButton_2->setText(QApplication::translate("MyForm", "PushButton", 0, QApplication::UnicodeUTF8)); label_7->setText(QApplication::translate("MyForm", "TextLabel", 0, QApplication::UnicodeUTF8)); tabWidget->setTabText(tabWidget->indexOf(tab_2), QApplication::translate("MyForm", "Tab 2", 0, QApplication::UnicodeUTF8)); } // retranslateUi }; namespace Ui { class MyForm: public Ui_MyForm {}; } // namespace Ui QT_END_NAMESPACE #endif // UI_MYFORM_H