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. QScrollBar no scrolling signal emitted from QTableWidget
Forum Updated to NodeBB v4.3 + New Features

QScrollBar no scrolling signal emitted from QTableWidget

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 2 Posters 1.3k Views 1 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.
  • Q Offline
    Q Offline
    Q139
    wrote on last edited by Q139
    #1

    QScrollBar no signal emitted from QTableWidget

    connect(ui->tableTimes->horizontalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(timeScrolled()));
    

    What is done wrong?

    Is it possible to catch sorting click of horizontal tab also?

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      This should work, please check if the connect is working correctly (it returns a bool) and show us some more code.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        Q139
        wrote on last edited by Q139
        #3

        In mainWin.h

        public slots:
        void timeScrolled();
        

        .cpp

        connect(ui->tableTimes->horizontalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(timeScrolled()));
        

        Also tryed insering items and connecting signal after scrollbar appeared on list.
        No error of connect failed in log , but no signal emitted also when scrolling with mouse or dragging etc.
        If needed il make empty project with minimal code.

        1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Q139 said in QScrollBar no scrolling signal emitted from QTableWidget:

          No error of connect failed in log

          Which log? Such errors are printed to stdout. And did you now check the return value of the connect statement?

          If needed il make empty project with minimal code.

          This would be good, should be no more than 20 lines I would guess.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          0
          • Q Offline
            Q Offline
            Q139
            wrote on last edited by Q139
            #5

            App output log, it usually displays if signals fail to connect to slots.

            This is small(3kB) project to test:
            https://easyupload.io/y9wopf

            return value of connect statement is 1

            On disconnect 1 once then 0-es forever

            1 Reply Last reply
            0
            • Christian EhrlicherC Offline
              Christian EhrlicherC Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by
              #6

              There is no horizontal scrollbar in your example.

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              Q 1 Reply Last reply
              1
              • Christian EhrlicherC Christian Ehrlicher

                There is no horizontal scrollbar in your example.

                Q Offline
                Q Offline
                Q139
                wrote on last edited by Q139
                #7

                @Christian-Ehrlicher
                Great...
                I copied the connect code from internet , sligtly altered and didnot notice horizontal/vertical .
                Thanks for pointing that out, you have made my day productive.

                Christian EhrlicherC 1 Reply Last reply
                0
                • Q Q139

                  @Christian-Ehrlicher
                  Great...
                  I copied the connect code from internet , sligtly altered and didnot notice horizontal/vertical .
                  Thanks for pointing that out, you have made my day productive.

                  Christian EhrlicherC Offline
                  Christian EhrlicherC Offline
                  Christian Ehrlicher
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @Q139 Then please mark this topic as solved, thx.

                  Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                  Visit the Qt Academy at https://academy.qt.io/catalog

                  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