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

Q3TabDialog doesn't work as QTabDialog from Qt3

    XMLWordPrintable

Details

    Description

      Running the code below results in the OK button to be on top of the tabs.
      Running an equivalent Qt3 code version results in the OK button to be correctly shown on the bottom.

      // ------------------------------------------
      #include <QtGui>
      #include <Qt3Support>

      class AliceLoadMenuWindow : public Q3TabDialog

      { Q_OBJECT private: Q3HBox* geomBox; Q3HBox* ilumBox; Q3VGroupBox* fila1Geom; QCheckBox* resetCB; Q3ButtonGroup* fila1Ilum; QRadioButton *ilumDefecto; QRadioButton *ilumModelos; public: AliceLoadMenuWindow(QWidget* parent=0, const char* name=0); }; class test: public Q3MainWindow { Q_OBJECT public: test(QWidget *parent=0, const char *name=0); public slots: void slotSave(); }; AliceLoadMenuWindow:: AliceLoadMenuWindow(QWidget* parent, const char* name) : Q3TabDialog(parent,name,TRUE) { geomBox = new Q3HBox(this); ilumBox = new Q3HBox(this); addTab(geomBox,tr("tab1")); addTab(ilumBox,tr("tab2")); fila1Geom = new Q3VGroupBox(geomBox); resetCB = new QCheckBox(tr("CB"),fila1Geom); resetCB->setChecked(TRUE); fila1Ilum = new Q3ButtonGroup(1,Qt::Horizontal,ilumBox); ilumDefecto = new QRadioButton(tr("RB1"),fila1Ilum); ilumModelos = new QRadioButton(tr("RB2"),fila1Ilum); }

      test::test(QWidget *parent, const char *name)
      :Q3MainWindow(parent,name,0)
      {
      slotSave();
      }

      void test::slotSave()
      {
      AliceLoadMenuWindow* aliceLoadMenuWindow = new AliceLoadMenuWindow(this);
      aliceLoadMenuWindow->exec();
      delete aliceLoadMenuWindow;
      }

      int main( int argc, char ** argv )
      {
      QApplication a( argc, argv );
      test t;
      t.resize( 700, 800 );
      t.show();
      return a.exec();
      }

      #include "test.moc"
      // ------------------------------------------

      Attachments

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

        Activity

          People

            bjnilsen Bjørn Erik Nilsen
            admin Administrator
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes