qt-interest@trolltech.com
[Top] [All Lists]

Re: updating QTableWidget in Qt4

Subject: Re: updating QTableWidget in Qt4
From: Javier Díaz
Date: Tue, 26 Jul 2005 11:12:39 +0200
Hi Armando,

maybe you can try this:

  horizontalHeader()->setLabel(section, text, size);


I'm still working on Qt 3.3.4, but using the setLabel method it runs!

Regards

Armando Navarro Vázquez wrote:

Dear All:
I am trying to update the contents of the horizontal header in a QTableWidget, whereas editing a QLineEdit, so my code is something like:

 connect(_nameEdit,SIGNAL(textChanged(const
QString&)),this,SLOT(OnNameChanged(const QString&)));

MyWidget::OnNameChanged(const QString& s)
{
_paramTable->horizontalHeaderItem(0)->setText(s);
}

The problem is that table is not refreshed even if I call update() or repaint() explicitely, and the new contents are not shown till
I move the window.

Any hints?



<Prev in Thread] Current Thread [Next in Thread>