slscripters
25th May 2010, 08:50
Hi,
I am developing a customized list widget and I've derived it from QListWidget. I've encountered a problem where in I cannot select the row I wan't to select in my customized list. My list has overriden the QWidget::keyPressEvent function and it simply perfroms it's specific behavior and later on calls QListWidget::keyPressEvent to maintain the other default behavior? However, I've problems with this as I've said above, but when I called the base class's function first before the specific behavior my list selects the item correctly.
What could be the problem here and what is the recommended way of overriding base class functions especially in the case of just adding a specific behavior(maintaining other default behavior)? Am I on the right track?:confused:
I am developing a customized list widget and I've derived it from QListWidget. I've encountered a problem where in I cannot select the row I wan't to select in my customized list. My list has overriden the QWidget::keyPressEvent function and it simply perfroms it's specific behavior and later on calls QListWidget::keyPressEvent to maintain the other default behavior? However, I've problems with this as I've said above, but when I called the base class's function first before the specific behavior my list selects the item correctly.
What could be the problem here and what is the recommended way of overriding base class functions especially in the case of just adding a specific behavior(maintaining other default behavior)? Am I on the right track?:confused: