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. Issue with function cloning data and inserting to the wrong table?

Issue with function cloning data and inserting to the wrong table?

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 3 Posters 678 Views 3 Watching
  • 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.
  • D Offline
    D Offline
    DIRi
    wrote on last edited by DIRi
    #1
    This post is deleted!
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #4

      Ok... so you are in fact trying to load several different widgets within the same which is not how you should do it. Each of your secondary ui files should be set on a different widget in order for them to be cleanly separated and usable.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      D 1 Reply Last reply
      2
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Hi,

        Where in your do you have a second table widget ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        D 1 Reply Last reply
        1
        • SGaistS SGaist

          Hi,

          Where in your do you have a second table widget ?

          D Offline
          D Offline
          DIRi
          wrote on last edited by
          #3
          This post is deleted!
          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #4

            Ok... so you are in fact trying to load several different widgets within the same which is not how you should do it. Each of your secondary ui files should be set on a different widget in order for them to be cleanly separated and usable.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            D 1 Reply Last reply
            2
            • D Offline
              D Offline
              DIRi
              wrote on last edited by
              #5
              This post is deleted!
              1 Reply Last reply
              0
              • SGaistS SGaist

                Ok... so you are in fact trying to load several different widgets within the same which is not how you should do it. Each of your secondary ui files should be set on a different widget in order for them to be cleanly separated and usable.

                D Offline
                D Offline
                DIRi
                wrote on last edited by
                #6
                This post is deleted!
                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #7

                  Rather than trying to load all of them within one widget. Have them each in their own. And then use them in your MainWindow like you would any standard widget.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by
                    #8

                    Hi
                    Something like ( disclaimer, total python noob)

                    class MyQWidget(QtWidgets.QWidget):
                        def __init__(self):
                            super(MyQWidget, self).__init__()
                            uic.loadUi('basic.ui', self) # Load the .ui file
                    

                    https://nitratine.net/blog/post/how-to-import-a-pyqt5-ui-file-in-a-python-gui/

                    Then create an instance of MyQWidget and insert it into your MainWindow, preferable using a layout
                    to hold both tables.

                    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