Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. what is way to create signal and slot on setVerticalScrollBar ?
Forum Updated to NodeBB v4.3 + New Features

what is way to create signal and slot on setVerticalScrollBar ?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
5 Posts 3 Posters 650 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
    Qt embedded developer
    wrote on last edited by Qt embedded developer
    #1

    i want to implement on signal and slot such as set vertical scroll bar value get change then call custom created slot function. but how to use it i don't know if any body know about it give me example for below case
    ui->scrollArea->setVerticalScrollBar(new QScrollBar(ui->scrollArea));

    jsulmJ S 2 Replies Last reply
    0
    • Q Qt embedded developer

      i want to implement on signal and slot such as set vertical scroll bar value get change then call custom created slot function. but how to use it i don't know if any body know about it give me example for below case
      ui->scrollArea->setVerticalScrollBar(new QScrollBar(ui->scrollArea));

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

      @Qt-embedded-developer Why do you need a signal for that? Its you sets the scroll bar, right? So, you know when it is set.

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

      Q 1 Reply Last reply
      0
      • jsulmJ jsulm

        @Qt-embedded-developer Why do you need a signal for that? Its you sets the scroll bar, right? So, you know when it is set.

        Q Offline
        Q Offline
        Qt embedded developer
        wrote on last edited by
        #3

        @jsulm because on scrolling inside scroll area i need to catch the value as we scroll and on that i want to add more widget inside it like image icons

        jsulmJ 1 Reply Last reply
        0
        • Q Qt embedded developer

          @jsulm because on scrolling inside scroll area i need to catch the value as we scroll and on that i want to add more widget inside it like image icons

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

          @Qt-embedded-developer For scrolling signal there is https://doc.qt.io/qt-5/qabstractslider.html#valueChanged and https://doc.qt.io/qt-5/qabstractslider.html#sliderMoved

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

          1 Reply Last reply
          2
          • Q Qt embedded developer

            i want to implement on signal and slot such as set vertical scroll bar value get change then call custom created slot function. but how to use it i don't know if any body know about it give me example for below case
            ui->scrollArea->setVerticalScrollBar(new QScrollBar(ui->scrollArea));

            S Offline
            S Offline
            SimonSchroeder
            wrote on last edited by
            #5

            @Qt-embedded-developer said in what is way to create signal and slot on setVerticalScrollBar ?:

            ui->scrollArea->setVerticalScrollBar(new QScrollBar(ui->scrollArea));

            There is no reason to install your own scroll bar object. Based on the settings of the scroll area it will create/show one when needed. You can get a handle to it with ui->scrollArea->verticalScrollBar(). Then use the signals of the scollbar to get informed about changes.

            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