QTableWidget inside QMessagebox
-
Can we put a table inside a mesagebox? If yes then how? I am new to PyQt5, it will be great if anyone helps me out here.
-
Can we put a table inside a mesagebox? If yes then how? I am new to PyQt5, it will be great if anyone helps me out here.
@Prathamesh said in QTableWidget inside QMessagebox:
Can we put a table inside a mesagebox?
Why would you put a table in a message box? Message box is there to show a short message to the user. What you probably want is QDialog.
-
@Prathamesh said in QTableWidget inside QMessagebox:
Can we put a table inside a mesagebox?
Why would you put a table in a message box? Message box is there to show a short message to the user. What you probably want is QDialog.
@jsulm Actually I want a pop-up after clicking a button ,which will be having a table. So I thought messagebox can solve my issue. Anyways, how to do it with QDialog?
-
@jsulm Actually I want a pop-up after clicking a button ,which will be having a table. So I thought messagebox can solve my issue. Anyways, how to do it with QDialog?
@Prathamesh
By creating the newQDialog
and adding widgets/layouts as desired for whatever you want, including some kind of table. -
@jsulm Actually I want a pop-up after clicking a button ,which will be having a table. So I thought messagebox can solve my issue. Anyways, how to do it with QDialog?
@Prathamesh said in QTableWidget inside QMessagebox:
Anyways, how to do it with QDialog?
https://code.qt.io/cgit/qt/qtbase.git/tree/examples/widgets/dialogs/standarddialogs?h=5.15
-
@Prathamesh said in QTableWidget inside QMessagebox:
Anyways, how to do it with QDialog?
https://code.qt.io/cgit/qt/qtbase.git/tree/examples/widgets/dialogs/standarddialogs?h=5.15
@jsulm This is cpp code, could you please share python code?
-
@jsulm This is cpp code, could you please share python code?
@Prathamesh said in QTableWidget inside QMessagebox:
could you please share python code?
I don't have Python code.
Translate that code into Python.But you can simply subclass QDialog and put whatever you need on it.
-
@Prathamesh said in QTableWidget inside QMessagebox:
could you please share python code?
I don't have Python code.
Translate that code into Python.But you can simply subclass QDialog and put whatever you need on it.
@jsulm Ok no problem,thank you for the code.
-
I am using Qt Designer. So I want to get a pop-up after clicking on a button I am showing in an image attached here. In that pop-up I want a table. So is QDialog necessary or it can be done in any other simple way?
-
I am using Qt Designer. So I want to get a pop-up after clicking on a button I am showing in an image attached here. In that pop-up I want a table. So is QDialog necessary or it can be done in any other simple way?