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

Q3Table cellWidget bug

    XMLWordPrintable

Details

    Description

      When using a Q3Table and having a QPushButton as a CellWidget, when resizing the column in a way the mousebutton is released when the mouse cursor is already outside to the right of the widget, the result is that the QPushButton isn't moved to the correct new position (which would be already outside the viewport) but instead it stays on the previous position.

      #include <q3table.h>
      #include <qapplication.h>
      #include <qpushbutton.h>

      main(int argc, char **argv)
      {
      QApplication app(argc, argv);

      Q3Table *t = new Q3Table();

      t->setNumCols(55);
      t->setNumRows(55);
      t->setSorting(false);

      for (int c = 0; c < t->numCols(); c++)
      t->setColumnWidth(c, 100);

      t->setCellWidget(3, 3, new QPushButton);

      t->setReadOnly(false);
      t->setSelectionMode(Q3Table::NoSelection);
      t->setFocusStyle(Q3Table::FollowStyle);

      t->resize(600, 565);
      t->show();

      app.exec();
      }

      Attachments

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

        Activity

          People

            bdo Jo Asplin (Inactive)
            engvolds Morten Engvoldsen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes