try to catch signal
Qt Code:
To copy to clipboard, switch view to plain text mode
and then in slot to do
Qt Code:
To copy to clipboard, switch view to plain text mode
try to catch signal
Qt Code:
To copy to clipboard, switch view to plain text mode
and then in slot to do
Qt Code:
To copy to clipboard, switch view to plain text mode
Hello:
Thanx for the advise.
Unfortunately this does not seem to do the trick. I tried this and variations on it, including the mouse events, to no avail.
Any other thoughts?
best regards,
Jon K
Ann Arbor Michigan
Oh, by the way...
I am using Qt 4.4 on Mac OS X and MS-Windows.
best regards,
Jon K
Ann Arbor Michigan U.S.A.
do you inherit QTreeView or just use it like a widget?
Hello:
I have a view class derived from QTreeView, primarily to make it be a fixed number of rows. In my derived class is where I hooked up the signal/slot connections, and tried to catch the mouse events.
best regards,
Jon K
maybe this will help you. In .NETther is control property called EditMode, and when you put it on EditOnEnter your problem is solved. EditTriggers should be simmilar..
editTriggers : EditTriggers
This property holds which actions will initiate item editing.
This property is a selection of flags defined by EditTrigger, combined using the OR operator. The view will only initiate the editing of an item if the action performed is set in this property.
Access functions:
EditTriggers editTriggers () const
void setEditTriggers ( EditTriggers triggers )
enum QAbstractItemView::EditTrigger
flags QAbstractItemView::EditTriggers
This enum describes actions which will initiate item editing.
QAbstractItemView:: NoEditTriggers, 0, No editing possible.
QAbstractItemView:: CurrentChanged, 1, Editing start whenever current item changes.
QAbstractItemView:: DoubleClicked, 2, Editing starts when an item is double clicked.
QAbstractItemView:: SelectedClicked, 4, Editing starts when clicking on an already selected item.
QAbstractItemView:: EditKeyPressed, 8, Editing starts when the platform edit key has been pressed over an item.
QAbstractItemView:: AnyKeyPressed, 16, Editing starts when any key is pressed over an item.
QAbstractItemView:: AllEditTriggers, 31, Editing starts for all above actions.
Hello:
Yes, edit triggers is precisely the means I supposed would address this interaction. I have set the edit triggers value to AllEditTriggers.
Should this not have done the trick?
Thanx for your thoughts.
Jon K
Ann Arbor Michigan U.S.A.
Have you reimplemented any event handlers? Perhaps you forgot to call base class implementation..
J-P Nurmi
Hello:
My derived class only re-implements sizeHint so I can make it a fixed height for a fixed number of rows.
Is that valid?
I briefly changed my code to use a QTreeView directly and it did not seem to have much of an impact...
best regards,
Jon K
Ann Arbor Michigan U.S.A.
I had the same problem and was able to fix it by leaving the default edit triggers and connecting the view's clicked(QModelIndex) signal to its edit(QModelIndex) slot.
Bookmarks