ricardo
15th May 2009, 00:17
Hi mates!
I added a popup menu to a QTableWidget, but position seems wrong, I guess is because I have a vertical and/or horizontal header. I think if I add header lenght, would be enoungh, but is there any other more generic solution?
void CSequencesDialog::popupSequences(const QPoint &pos) {
QWidget* widget=qobject_cast<QWidget *>(QObject::sender());
if (widget!=NULL)
m_popupSequences->popup(widget->mapToGlobal(pos));
}
Thanks for help.
I added a popup menu to a QTableWidget, but position seems wrong, I guess is because I have a vertical and/or horizontal header. I think if I add header lenght, would be enoungh, but is there any other more generic solution?
void CSequencesDialog::popupSequences(const QPoint &pos) {
QWidget* widget=qobject_cast<QWidget *>(QObject::sender());
if (widget!=NULL)
m_popupSequences->popup(widget->mapToGlobal(pos));
}
Thanks for help.