noobasaurus
6th April 2009, 20:35
Hello,
I need some help with the QApplication focusChanged() signal.
I have 2 classes lineedit and combobox which inherit from the Qt widget clases corresponding to those (QLineEdit, QComboBox). They hold some list of old data that was entered in them.
What im trying to do is display this information into a qlistWidget when the lineedit and comboboxes are clicked. I decided to use focusChanged since i have a lot of them (50+ over a large app)
i have a slot that takes 2 parameters (setWidgets(QWidget*, QWidget*)) the old and new widgets.
connect(app, SIGNAL(focusChanged(QWidget*, QWidget*)), this, SLOT(setWidgets(QWidget*, QWidget*)));
I was wondering how i could tell what type these QWidgets are so i can qobject_cast to the right one(lineedit or combobox) and retrieve these lists of information. Is there even a way?
I need some help with the QApplication focusChanged() signal.
I have 2 classes lineedit and combobox which inherit from the Qt widget clases corresponding to those (QLineEdit, QComboBox). They hold some list of old data that was entered in them.
What im trying to do is display this information into a qlistWidget when the lineedit and comboboxes are clicked. I decided to use focusChanged since i have a lot of them (50+ over a large app)
i have a slot that takes 2 parameters (setWidgets(QWidget*, QWidget*)) the old and new widgets.
connect(app, SIGNAL(focusChanged(QWidget*, QWidget*)), this, SLOT(setWidgets(QWidget*, QWidget*)));
I was wondering how i could tell what type these QWidgets are so i can qobject_cast to the right one(lineedit or combobox) and retrieve these lists of information. Is there even a way?