kazek3018
30th December 2008, 15:36
Hello again.
I working with QTableWidget. After setRowCount() and setColumnCount(), I have to do setItem(i, j, new QTableWidgetItem()). It's clear to me, obviously when I add some rows (or columns) I have to add more QTableWidgetItem. My question is do I have to remove QTableWidgetItem in this way
QTableWidgetItem *tmp;
tmp=m_ui->TableWidget->takeItem(i, j);
delete tmp;
before I set row count to smaller number? Or its implemented inside setRowCount()?
And second thing, I have to change GUI from QThread (display progress information in log window). For this I use signals and slots coonect looks like:
connect(......., Qt::DirectConnection);
I use DirectConnection because it's very important to keep the same order in signal processing and emitting. It's works but sometime I get:
QObject::connect: Cannot queue arguments of type 'QTextCursor'
(Make sure 'QTextCursor' is registered using qRegisterMetaType().)
in application output window, why?
I working with QTableWidget. After setRowCount() and setColumnCount(), I have to do setItem(i, j, new QTableWidgetItem()). It's clear to me, obviously when I add some rows (or columns) I have to add more QTableWidgetItem. My question is do I have to remove QTableWidgetItem in this way
QTableWidgetItem *tmp;
tmp=m_ui->TableWidget->takeItem(i, j);
delete tmp;
before I set row count to smaller number? Or its implemented inside setRowCount()?
And second thing, I have to change GUI from QThread (display progress information in log window). For this I use signals and slots coonect looks like:
connect(......., Qt::DirectConnection);
I use DirectConnection because it's very important to keep the same order in signal processing and emitting. It's works but sometime I get:
QObject::connect: Cannot queue arguments of type 'QTextCursor'
(Make sure 'QTextCursor' is registered using qRegisterMetaType().)
in application output window, why?