[Qt-interest] weird QTableItem behavior
Malyushytsky, Alex
alex at wai.com
Fri Sep 11 23:57:12 CEST 2009
It looks like there is no any relation between QTableItem, QTableView and your question.
I afraid if you want helpful answer you need formulate the problem better, small testable example to reproduce the problem would help.
On a side not, if you name variables "selectedShit" they behave the way you named them.
Regards,
Alex
-----Original Message-----
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Andrei Sebastian Cimpean
Sent: Friday, September 11, 2009 6:37 AM
To: qt-interest
Subject: [Qt-interest] weird QTableItem behavior
Hello everybody.
I have encountered a somewhat weird thing while using QTreeView and
QTableView. I have a tree structure showing off files, and inside the table i am
displaying the contents of a selected item from the tree. And i have a
QLineEdit where i have an editable path. The thing is that i want to make it
so you can navigate also by typing the path. If i want to return to the "/"
directory for example from inside "home" i use something like this:
QList<QTreeWidgetItem* >items = m_ui->treeWidget->findItems("/",
Qt::MatchRecursive | Qt::MatchExactly,0);
QList<QTreeWidgetItem* >selectedShit = m_ui->treeWidget->selectedItems();
selectedShit[0]->setSelected(false);
delete selectedShit[0];
m_ui->treeWidget->setItemSelected(items[0],true);
treeItemClicked(items[0]);
at first it seems to work. every table item that i click opens correctly into a
subfolder and so on and, the tree items also respond correctly. the thing is
that i cannot open the table item representing the folder i was inside. It
just gives me the option to rename it and that's all. I tried various things
but the issue somehow survived. Any ideas ? :(
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.
"This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you."
"Please consider our environment before printing this email."
More information about the Qt-interest-old
mailing list