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. Press one button - emit signal more time

Press one button - emit signal more time

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 1.1k Views
  • 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.
  • J Offline
    J Offline
    Jeronimo
    wrote on last edited by
    #1

    It's possible to use some bolean to avoid press one button all time? For example sometimes i'm doing thing's repetitive for example i'm doing some paint with qt and i want when i press button all time draw. In other words, it is possible to put on one botton pressed all time with some boolean to avoid press many times.

    jsulmJ 1 Reply Last reply
    0
    • J Jeronimo

      It's possible to use some bolean to avoid press one button all time? For example sometimes i'm doing thing's repetitive for example i'm doing some paint with qt and i want when i press button all time draw. In other words, it is possible to put on one botton pressed all time with some boolean to avoid press many times.

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

      @Jeronimo Why not just call the slot which is connected to your button where you need it? And yes you can set a boolean variable in the button slot.

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

      J 3 Replies Last reply
      0
      • jsulmJ jsulm

        @Jeronimo Why not just call the slot which is connected to your button where you need it? And yes you can set a boolean variable in the button slot.

        J Offline
        J Offline
        Jeronimo
        wrote on last edited by
        #3

        @jsulm call like so i only call the slot? can you put some little example ? thx

        1 Reply Last reply
        0
        • jsulmJ jsulm

          @Jeronimo Why not just call the slot which is connected to your button where you need it? And yes you can set a boolean variable in the button slot.

          J Offline
          J Offline
          Jeronimo
          wrote on last edited by Jeronimo
          #4

          @jsulm so i only call the slot and will emit all time?. But what will happen with other signals? will be stoped? idk I call directly the slot and then i will not have any problem the slot the button will be pressed all time?

          1 Reply Last reply
          0
          • jsulmJ jsulm

            @Jeronimo Why not just call the slot which is connected to your button where you need it? And yes you can set a boolean variable in the button slot.

            J Offline
            J Offline
            Jeronimo
            wrote on last edited by
            #5

            @jsulm normally i call with this way:
            connect (ui->botonpaint,SIGNAL(clicked()),this,SLOT(paint()));

            But you recommend me to call slot? where i put this call to be better?¿

            jsulmJ 1 Reply Last reply
            0
            • J Jeronimo

              @jsulm normally i call with this way:
              connect (ui->botonpaint,SIGNAL(clicked()),this,SLOT(paint()));

              But you recommend me to call slot? where i put this call to be better?¿

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

              @Jeronimo Sorry, I have no idea what you are asking for. Can you please explain better what you mean?
              A slot can be called just like any other method. That means you can for example call paint() whenever you need.

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

              1 Reply Last reply
              1

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved