Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. QTableWidget inside QMessagebox
QtWS25 Last Chance

QTableWidget inside QMessagebox

Scheduled Pinned Locked Moved Solved Qt for Python
10 Posts 3 Posters 1.1k 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
    Prathamesh
    wrote on last edited by
    #1

    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.

    jsulmJ 1 Reply Last reply
    0
    • P Prathamesh

      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.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

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

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

      P 1 Reply Last reply
      2
      • jsulmJ jsulm

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

        P Offline
        P Offline
        Prathamesh
        wrote on last edited by
        #3

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

        JonBJ jsulmJ 2 Replies Last reply
        0
        • P Prathamesh

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

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @Prathamesh
          By creating the new QDialog and adding widgets/layouts as desired for whatever you want, including some kind of table.

          1 Reply Last reply
          2
          • P Prathamesh

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

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @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

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

            P 1 Reply Last reply
            1
            • jsulmJ jsulm

              @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

              P Offline
              P Offline
              Prathamesh
              wrote on last edited by
              #6

              @jsulm This is cpp code, could you please share python code?

              jsulmJ 1 Reply Last reply
              0
              • P Prathamesh

                @jsulm This is cpp code, could you please share python code?

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #7

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

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

                P 1 Reply Last reply
                1
                • jsulmJ jsulm

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

                  P Offline
                  P Offline
                  Prathamesh
                  wrote on last edited by
                  #8

                  @jsulm Ok no problem,thank you for the code.

                  1 Reply Last reply
                  0
                  • P Offline
                    P Offline
                    Prathamesh
                    wrote on last edited by
                    #9

                    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?PXL_20210519_090249774~2.jpg

                    jsulmJ 1 Reply Last reply
                    0
                    • P Prathamesh

                      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?PXL_20210519_090249774~2.jpg

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      @Prathamesh https://doc.qt.io/qt-5/qmenu.html

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

                      1 Reply Last reply
                      0

                      • Login

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