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

BC between Qt 4.7.3 and 4.6.3. QTreeView::indexRowSizeHint doesn't return correct value on Symbian for row when QPushButton widget is inserted in the treeview.

    XMLWordPrintable

Details

    • 8b7c98123eadf9263c6bde4b1263bd64fc388c8d

    Description

      This error was found in BC testing between Qt 4.6.3 and 4.7 releases.
      Following test case is failed on Symbian platform. But it is passed with Qt 4.6.3.

      void tst_QTreeView::indexRowSizeHint()
      {
          QStandardItemModel model(10, 1);
          PublicView view;
      
          view.setModel(&model);
      
          QModelIndex index = model.index(5, 0);
          QPushButton *w = new QPushButton("Test");
          view.setIndexWidget(index, w);
      
          view.show();
      
      #if !defined(Q_OS_SYMBIAN)
          QCOMPARE(view.  (index), w->sizeHint().height());
      #else
          QCOMPARE(view.indexRowSizeHint(index), w->sizeHint().height()+10);
      #endif
      }
      

      FAIL! : tst_QTreeView::indexRowSizeHint() Compared values are not the same
      Actual (view.indexRowSizeHint(index)): 39
      Expected (w->sizeHint().height()+10): 47
      Loc: [G:\QtBc\QtBcFinal\bc\tests\gui\qtreeview\tst_qtreeview.cpp(2873)]

      tst_QTreeView::indexRowSizeHinttets is changed in Qt 4.7.2 to

          QCOMPARE(view.  (index), w->sizeHint().height());
      

      But still failed. Test result:
      FAIL! : tst_QTreeView::indexRowSizeHint() Compared values are not the same
      Actual (view.indexRowSizeHint(index)): 41
      Expected (w->sizeHint().height()+10): 39
      Loc: [G:\QtBc\QtBcFinal\bc\tests\gui\qtreeview\tst_qtreeview.cpp(2873)]

      It works correctly on Windows platform.
      Such changes will really impact on application view for application developed and compiled using Qt 4.6.3 but run on devices with Qt 4.7.

      Attachments

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

        Activity

          People

            samimeri Sami Merila (Inactive)
            vasyura Oleh Vasyura
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes