Pop up window displaying a dataframe
-
wrote on 1 Feb 2018, 10:49 last edited by
Hi,
I need to display a dataframe using a pop up window. When I click the on specific column value of a QTableWidget, a pop window would appear containing a dataframe. How can I do it in PyQt5? -
Hi,
I need to display a dataframe using a pop up window. When I click the on specific column value of a QTableWidget, a pop window would appear containing a dataframe. How can I do it in PyQt5? -
wrote on 1 Feb 2018, 11:30 last edited by
@jsulm I tried doing this by using message box. Big Moves is a Qtablewidget here . But the issue is I am unable to pass dataframe in the message box. How can I do that?
self.ui.BigMoves.itemDoubleClicked.connect(self.onClick) def onClick(self): msgbox = QtWidgets.QMessageBox() msgbox.setText('To see details: Click "Show Details"') msgbox.setTextInteractionFlags(QtCore.Qt.NoTextInteraction) msgbox.setDetailedText(Big21) msgbox.exec_()
-
@jsulm I tried doing this by using message box. Big Moves is a Qtablewidget here . But the issue is I am unable to pass dataframe in the message box. How can I do that?
self.ui.BigMoves.itemDoubleClicked.connect(self.onClick) def onClick(self): msgbox = QtWidgets.QMessageBox() msgbox.setText('To see details: Click "Show Details"') msgbox.setTextInteractionFlags(QtCore.Qt.NoTextInteraction) msgbox.setDetailedText(Big21) msgbox.exec_()
Lifetime Qt Championwrote on 1 Feb 2018, 11:33 last edited by jsulm 2 Jan 2018, 11:33@Piyush Well, depending on what data you want to show and how you will need to create your own dialog (subclass QDialog). Then you can pass what ever data you want.
Here is an example: http://doc.qt.io/qt-5/qtwidgets-dialogs-extension-example.html -
@Piyush Well, depending on what data you want to show and how you will need to create your own dialog (subclass QDialog). Then you can pass what ever data you want.
Here is an example: http://doc.qt.io/qt-5/qtwidgets-dialogs-extension-example.html -
@jsulm The dataframe I need to display is a simple table containing a few columns and rows which is stored in Python console. And I need to get the pop up window whenever I double click on the Qtablewidget.
@Piyush As I said: subclass QDialog and implement your UI there to display the data.
1/6