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. Strange entering values in QTableWidget
Forum Updated to NodeBB v4.3 + New Features

Strange entering values in QTableWidget

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 4 Posters 642 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.
  • T Offline
    T Offline
    Troyer
    wrote on last edited by
    #1

    Hi!
    Sorry for the strange task, but I need to enter values in the table in an unusual way.
    I will fill in an NxM table where N is the quantity set in the QComboBox class and M is the quantity set using QScrollArea (that is, the quantity will be set when scrolling).
    When the button is clicked, the values from these two classes should be taken and the table created. Can you tell me how to do this?
    The method is complex, but I really want to implement it! Thanks

    Image.JPG

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

      Hi,

      Are you trying to implant something similar to Word's insert table widget where you can drag the mouse to create an array of cells that will then become your table in the document ?

      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
      • T Offline
        T Offline
        Troyer
        wrote on last edited by
        #3

        I think not
        Just by clicking on the button, I will create an array of QTableWidget cells. These values (rows and columns) will be set from classes in QComboBox (rows) and QScrollArea (columns). But I don't know how to pass values from these classes to my QTabWidget class

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

          Hi

          When you click the button you can set the
          setRowCount(xxx) and generate items to match.

          https://wiki.qt.io/How_to_Use_QTableWidget

          However, im not sure what you want to read form the QScrollArea ?

          1 Reply Last reply
          0
          • T Offline
            T Offline
            Troyer
            wrote on last edited by
            #5

            I've almost solved my problem, but QScrollBar keeps bothering me (not QScrollArea, sorry). Is there any way to increase the value when scrolling the scroll bar, and then get that value?

            mrjjM Pl45m4P 2 Replies Last reply
            0
            • T Troyer

              I've almost solved my problem, but QScrollBar keeps bothering me (not QScrollArea, sorry). Is there any way to increase the value when scrolling the scroll bar, and then get that value?

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Troyer

              There is the singleStep property but not sure it applies if you drag the scrollbar but try set it to bigger
              and see.

              1 Reply Last reply
              0
              • T Troyer

                I've almost solved my problem, but QScrollBar keeps bothering me (not QScrollArea, sorry). Is there any way to increase the value when scrolling the scroll bar, and then get that value?

                Pl45m4P Offline
                Pl45m4P Offline
                Pl45m4
                wrote on last edited by
                #7

                @Troyer

                I think even QScrollBar is not the right choice.
                If you want to do, what I think, you are probably looking for this: QSlider


                If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                ~E. W. Dijkstra

                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