Add multiple columns inside a tableview cell The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceAdd new keys to a dictionary?Catch multiple exceptions in one line (except block)nested classes in PythonSelecting multiple columns in a pandas dataframeRenaming columns in pandasDelete column from pandas DataFrame by column nameSelect rows from a DataFrame based on values in a column in pandasSimple Inherit from class in Python throws errorDerived panel classes in wxpythonwxpython - Erase background erases non-background components

how can a perfect fourth interval be considered either consonant or dissonant?

Make it rain characters

Can the DM override racial traits?

How to grep and cut numbes from a file and sum them

In horse breeding, what is the female equivalent of putting a horse out "to stud"?

He got a vote 80% that of Emmanuel Macron’s

Can a novice safely splice in wire to lengthen 5V charging cable?

Why don't hard Brexiteers insist on a hard border to prevent illegal immigration after Brexit?

Was credit for the black hole image misattributed?

The following signatures were invalid: EXPKEYSIG 1397BC53640DB551

Would it be possible to rearrange a dragon's flight muscle to somewhat circumvent the square-cube law?

How to politely respond to generic emails requesting a PhD/job in my lab? Without wasting too much time

Hopping to infinity along a string of digits

What do you call a plan that's an alternative plan in case your initial plan fails?

Is above average number of years spent on PhD considered a red flag in future academia or industry positions?

Why not take a picture of a closer black hole?

Is it ethical to upload a automatically generated paper to a non peer-reviewed site as part of a larger research?

Is there a writing software that you can sort scenes like slides in PowerPoint?

Does Parliament hold absolute power in the UK?

Can smartphones with the same camera sensor have different image quality?

ELI5: Why do they say that Israel would have been the fourth country to land a spacecraft on the Moon and why do they call it low cost?

Working through the single responsibility principle (SRP) in Python when calls are expensive

Semisimplicity of the category of coherent sheaves?

Am I ethically obligated to go into work on an off day if the reason is sudden?



Add multiple columns inside a tableview cell



The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
The Ask Question Wizard is Live!
Data science time! April 2019 and salary with experienceAdd new keys to a dictionary?Catch multiple exceptions in one line (except block)nested classes in PythonSelecting multiple columns in a pandas dataframeRenaming columns in pandasDelete column from pandas DataFrame by column nameSelect rows from a DataFrame based on values in a column in pandasSimple Inherit from class in Python throws errorDerived panel classes in wxpythonwxpython - Erase background erases non-background components



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















Click here to see the picture



I'm trying to create a table that have a column inside a cell. Is there an easy way to implement this design to the table view I'm working with?



This is my code right now:



class ColumnsLayout(QWidget):
def __init__(self, parent=None):
super(ColumnsLayout, self).__init__(parent)
table_row = QTableWidget()
table_row.setColumnCount(3)
table_row.horizontalHeader().setVisible(False)
for x in range(0, 3):
table_row.horizontalHeader().setSectionResizeMode(x, QHeaderView.Stretch)
layout = QHBoxLayout()
layout.setContentsMargins(0, 0, 0, 0)
layout.setSpacing(0)
layout.addWidget(table_row)
self.setLayout(layout)


self.ui.fields_tableWidget.setCellWidget(self.current_default_total_row, 2, ColumnsLayout())









share|improve this question






























    1















    Click here to see the picture



    I'm trying to create a table that have a column inside a cell. Is there an easy way to implement this design to the table view I'm working with?



    This is my code right now:



    class ColumnsLayout(QWidget):
    def __init__(self, parent=None):
    super(ColumnsLayout, self).__init__(parent)
    table_row = QTableWidget()
    table_row.setColumnCount(3)
    table_row.horizontalHeader().setVisible(False)
    for x in range(0, 3):
    table_row.horizontalHeader().setSectionResizeMode(x, QHeaderView.Stretch)
    layout = QHBoxLayout()
    layout.setContentsMargins(0, 0, 0, 0)
    layout.setSpacing(0)
    layout.addWidget(table_row)
    self.setLayout(layout)


    self.ui.fields_tableWidget.setCellWidget(self.current_default_total_row, 2, ColumnsLayout())









    share|improve this question


























      1












      1








      1








      Click here to see the picture



      I'm trying to create a table that have a column inside a cell. Is there an easy way to implement this design to the table view I'm working with?



      This is my code right now:



      class ColumnsLayout(QWidget):
      def __init__(self, parent=None):
      super(ColumnsLayout, self).__init__(parent)
      table_row = QTableWidget()
      table_row.setColumnCount(3)
      table_row.horizontalHeader().setVisible(False)
      for x in range(0, 3):
      table_row.horizontalHeader().setSectionResizeMode(x, QHeaderView.Stretch)
      layout = QHBoxLayout()
      layout.setContentsMargins(0, 0, 0, 0)
      layout.setSpacing(0)
      layout.addWidget(table_row)
      self.setLayout(layout)


      self.ui.fields_tableWidget.setCellWidget(self.current_default_total_row, 2, ColumnsLayout())









      share|improve this question
















      Click here to see the picture



      I'm trying to create a table that have a column inside a cell. Is there an easy way to implement this design to the table view I'm working with?



      This is my code right now:



      class ColumnsLayout(QWidget):
      def __init__(self, parent=None):
      super(ColumnsLayout, self).__init__(parent)
      table_row = QTableWidget()
      table_row.setColumnCount(3)
      table_row.horizontalHeader().setVisible(False)
      for x in range(0, 3):
      table_row.horizontalHeader().setSectionResizeMode(x, QHeaderView.Stretch)
      layout = QHBoxLayout()
      layout.setContentsMargins(0, 0, 0, 0)
      layout.setSpacing(0)
      layout.addWidget(table_row)
      self.setLayout(layout)


      self.ui.fields_tableWidget.setCellWidget(self.current_default_total_row, 2, ColumnsLayout())






      python pyside pyside2






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 22 at 6:09







      Arci Jeirico Malabanan

















      asked Mar 22 at 5:54









      Arci Jeirico MalabananArci Jeirico Malabanan

      276




      276






















          1 Answer
          1






          active

          oldest

          votes


















          0














          You can use setSpan() to join cells



          from PySide2 import QtWidgets

          class ColumnsLayout(QtWidgets.QWidget):
          def __init__(self, parent=None):
          super(ColumnsLayout, self).__init__(parent)
          table_row = QtWidgets.QTableWidget(4, 3)
          table_row.horizontalHeader().hide()
          table_row.setSpan(0, 0, 1, 3)
          for x in range(0, 3):
          table_row.horizontalHeader().setSectionResizeMode(x, QtWidgets.QHeaderView.Stretch)
          layout = QtWidgets.QHBoxLayout(self)
          layout.setContentsMargins(0, 0, 0, 0)
          layout.setSpacing(0)
          layout.addWidget(table_row)

          if __name__ == '__main__':
          import sys
          app = QtWidgets.QApplication(sys.argv)
          w = ColumnsLayout()
          w.show()
          sys.exit(app.exec_())


          enter image description here






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55293664%2fadd-multiple-columns-inside-a-tableview-cell%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            You can use setSpan() to join cells



            from PySide2 import QtWidgets

            class ColumnsLayout(QtWidgets.QWidget):
            def __init__(self, parent=None):
            super(ColumnsLayout, self).__init__(parent)
            table_row = QtWidgets.QTableWidget(4, 3)
            table_row.horizontalHeader().hide()
            table_row.setSpan(0, 0, 1, 3)
            for x in range(0, 3):
            table_row.horizontalHeader().setSectionResizeMode(x, QtWidgets.QHeaderView.Stretch)
            layout = QtWidgets.QHBoxLayout(self)
            layout.setContentsMargins(0, 0, 0, 0)
            layout.setSpacing(0)
            layout.addWidget(table_row)

            if __name__ == '__main__':
            import sys
            app = QtWidgets.QApplication(sys.argv)
            w = ColumnsLayout()
            w.show()
            sys.exit(app.exec_())


            enter image description here






            share|improve this answer



























              0














              You can use setSpan() to join cells



              from PySide2 import QtWidgets

              class ColumnsLayout(QtWidgets.QWidget):
              def __init__(self, parent=None):
              super(ColumnsLayout, self).__init__(parent)
              table_row = QtWidgets.QTableWidget(4, 3)
              table_row.horizontalHeader().hide()
              table_row.setSpan(0, 0, 1, 3)
              for x in range(0, 3):
              table_row.horizontalHeader().setSectionResizeMode(x, QtWidgets.QHeaderView.Stretch)
              layout = QtWidgets.QHBoxLayout(self)
              layout.setContentsMargins(0, 0, 0, 0)
              layout.setSpacing(0)
              layout.addWidget(table_row)

              if __name__ == '__main__':
              import sys
              app = QtWidgets.QApplication(sys.argv)
              w = ColumnsLayout()
              w.show()
              sys.exit(app.exec_())


              enter image description here






              share|improve this answer

























                0












                0








                0







                You can use setSpan() to join cells



                from PySide2 import QtWidgets

                class ColumnsLayout(QtWidgets.QWidget):
                def __init__(self, parent=None):
                super(ColumnsLayout, self).__init__(parent)
                table_row = QtWidgets.QTableWidget(4, 3)
                table_row.horizontalHeader().hide()
                table_row.setSpan(0, 0, 1, 3)
                for x in range(0, 3):
                table_row.horizontalHeader().setSectionResizeMode(x, QtWidgets.QHeaderView.Stretch)
                layout = QtWidgets.QHBoxLayout(self)
                layout.setContentsMargins(0, 0, 0, 0)
                layout.setSpacing(0)
                layout.addWidget(table_row)

                if __name__ == '__main__':
                import sys
                app = QtWidgets.QApplication(sys.argv)
                w = ColumnsLayout()
                w.show()
                sys.exit(app.exec_())


                enter image description here






                share|improve this answer













                You can use setSpan() to join cells



                from PySide2 import QtWidgets

                class ColumnsLayout(QtWidgets.QWidget):
                def __init__(self, parent=None):
                super(ColumnsLayout, self).__init__(parent)
                table_row = QtWidgets.QTableWidget(4, 3)
                table_row.horizontalHeader().hide()
                table_row.setSpan(0, 0, 1, 3)
                for x in range(0, 3):
                table_row.horizontalHeader().setSectionResizeMode(x, QtWidgets.QHeaderView.Stretch)
                layout = QtWidgets.QHBoxLayout(self)
                layout.setContentsMargins(0, 0, 0, 0)
                layout.setSpacing(0)
                layout.addWidget(table_row)

                if __name__ == '__main__':
                import sys
                app = QtWidgets.QApplication(sys.argv)
                w = ColumnsLayout()
                w.show()
                sys.exit(app.exec_())


                enter image description here







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 22 at 6:12









                eyllanesceyllanesc

                87.8k103564




                87.8k103564





























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55293664%2fadd-multiple-columns-inside-a-tableview-cell%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                    용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

                    155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해