[Qt-interest] ItemDelegate not getting called when click+dragging outside of a table

Neil Hooey nhooey at gmail.com
Mon Jun 29 18:49:40 CEST 2009


It seems that if you have any sort of StyleSheet set for the table,
then ItemDelegates get called at the right time.

On Mon, Jun 29, 2009 at 11:46 AM, Neil Hooey<nhooey at gmail.com> wrote:
> I wrote an ItemDelegate that I've set for several tables, that changes
> the appearance of cells when they are pushed and released.
>
> When I click+drag on a cell, and drag the mouse outside of the table,
> that ItemDelegate is being called to redraw one particular table, but
> for the rest of the tables it's not.
>
> The table that works properly, and has its ItemDelegate called when
> click+dragging outside of the table, has these modifications in the
> ui_*.h file:
>
> table->setPalette(palette1);
> table->setAutoFillBackground(true);
> table->setStyleSheet(QString::fromUtf8("QTableView {\n"
>        "  border: 1px solid black;\n}"));
> table->setFrameShape(QFrame::StyledPanel);
> table->setLineWidth(0);
> table->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
> table->setTabKeyNavigation(false);
> table->setSelectionMode(QAbstractItemView::NoSelection);
> table->setShowGrid(false);
> table->setSortingEnabled(true);
> table->setCornerButtonEnabled(false);
>
> I haven't been able to find anything significantly different between
> my working table and the rest.
>
> Does anyone know to get the rest of the tables have their ItemDelegate
> called when click+dragging out of their boundaries?
>
> - Neil
>




More information about the Qt-interest-old mailing list