Originally Posted by
wysota
Thanks! I've tried your solution but the wierd thing is that the signal sectionResized doenst get emitted... I've tried a couple of things but everytime when i want to use a signal, it just doens't get emitted when I resize my column. Any idea?
The way I try to connect:
QObject::connect(m_fileTableView
->horizontalHeader
(),
SIGNAL(sectionResized
(int,
int,
int)),m_selectionTableView,
SLOT(onSectionResized
(int,
int,
int)));
QObject::connect(m_fileTableView->horizontalHeader(),SIGNAL(sectionResized(int,int,int)),m_selectionTableView,SLOT(onSectionResized(int,int,int)));
To copy to clipboard, switch view to plain text mode
The onSecionResized is defined as a public slot, as it should be. In this slot, I do the following:
QHeaderView* selectionHeader
= m_selectionTableView
->horizontalHeader
();
if(selectionHeader)
return selectionHeader->resizeSection(index, newSize);
else
return ;
QHeaderView* selectionHeader = m_selectionTableView->horizontalHeader();
if(selectionHeader)
return selectionHeader->resizeSection(index, newSize);
else
return ;
To copy to clipboard, switch view to plain text mode
But ok, in debug mode, while using breakpoints, the slot doens't get called. So this means the signals just doens't get emitted.
Originally Posted by
ChrisW67
Seems odd to go to all this effort to duplicate the supplied selection highlighting.
Well it does look wierd. What I have is at the left om my screen a file tree view. With this view, I go to a certain folder containing hunderds of measurement files written in a .txt file. All these measurement files are read and certain parameters are loaded into my first table view. The second table view let's me see the selected items from the first table view, but only those selected items. Now, these selected items from the first table view, are selected by a function that looks at the parameters and makes an automatic selection, it's actually a filter to all the measurement files.
With only the selected measurement in the second table view, I create a graph.
Bookmarks