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.
-
@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?
-
@Prathamesh
By creating the newQDialog
and adding widgets/layouts as desired for whatever you want, including some kind of table. -
@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?
-
@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.
-
-
4/10