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.
-
@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
-
@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.
-
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?
-