I’ve made a widget derived from QTableWidget and I would like to execute a slot each time the a column or a line is resize, and each time the widget is resized. How to do that as there is no signal for that ?
Thank you very much.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
For resizing of the widget itself: Inherit from
QTableView, add a signal reimplement resizeEvent. In yourresizeEventemmityour new signal and call the base implementation ofresizeEventto actually do the resizing.For resizing of columns: Use the signals from the associated QHeaderView which you can obtain with horizontalHeader