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
Forum Updated to NodeBB v4.3 + New Features

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

    jsulmJ 1 Reply Last reply
    0
    • P Piyush

      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?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on 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
      • jsulmJ jsulm

        @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 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_()
        
        jsulmJ 1 Reply Last reply
        0
        • P Piyush

          @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_()
          
          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by jsulm
          #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
          • jsulmJ jsulm

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

            jsulmJ 1 Reply Last reply
            0
            • P Piyush

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

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on 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

              • Login

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