Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Pop up window displaying a dataframe
QtWS25 Last Chance

Pop up window displaying a dataframe

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 2.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Piyush
    wrote on 1 Feb 2018, 10:49 last edited by
    #1

    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?

    J 1 Reply Last reply 1 Feb 2018, 11:13
    0
    • P Piyush
      1 Feb 2018, 10:49

      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?

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 1 Feb 2018, 11:13 last edited by
      #2

      @Piyush Check http://doc.qt.io/qt-5/qdialog.html and http://doc.qt.io/qt-5/qwidget.html#keyPressEvent

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      P 1 Reply Last reply 1 Feb 2018, 11:30
      1
      • J jsulm
        1 Feb 2018, 11:13

        @Piyush Check http://doc.qt.io/qt-5/qdialog.html and http://doc.qt.io/qt-5/qwidget.html#keyPressEvent

        P Offline
        P Offline
        Piyush
        wrote on 1 Feb 2018, 11:30 last edited by
        #3

        @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_()
        
        J 1 Reply Last reply 1 Feb 2018, 11:33
        0
        • P Piyush
          1 Feb 2018, 11:30

          @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_()
          
          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 1 Feb 2018, 11:33 last edited by jsulm 2 Jan 2018, 11:33
          #4

          @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

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          P 1 Reply Last reply 1 Feb 2018, 11:36
          1
          • J jsulm
            1 Feb 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

            P Offline
            P Offline
            Piyush
            wrote on 1 Feb 2018, 11:36 last edited by
            #5

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

            J 1 Reply Last reply 1 Feb 2018, 11:37
            0
            • P Piyush
              1 Feb 2018, 11:36

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

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 1 Feb 2018, 11:37 last edited by
              #6

              @Piyush As I said: subclass QDialog and implement your UI there to display the data.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              2

              1/6

              1 Feb 2018, 10:49

              • Login

              • Login or register to search.
              1 out of 6
              • First post
                1/6
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved