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. how to use signals and slots for qstring in qt
Forum Updated to NodeBB v4.3 + New Features

how to use signals and slots for qstring in qt

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 4 Posters 333 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.
  • M Offline
    M Offline
    Meera Hadid
    wrote on last edited by
    #1

    I have a QString name this value changes whenever the button is clicked. Now I want to call a function update() whenever the name value changes.

    eyllanescE JonBJ Thank YouT 3 Replies Last reply
    0
    • M Meera Hadid

      I have a QString name this value changes whenever the button is clicked. Now I want to call a function update() whenever the name value changes.

      eyllanescE Offline
      eyllanescE Offline
      eyllanesc
      wrote on last edited by
      #2

      @Meera-Hadid please provide a minimal and verifiable example.

      If you want me to help you develop some work then you can write to my email: e.yllanescucho@gmal.com.

      1 Reply Last reply
      2
      • M Meera Hadid

        I have a QString name this value changes whenever the button is clicked. Now I want to call a function update() whenever the name value changes.

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by
        #3

        @Meera-Hadid
        As @eyllanesc says you need to be more specific. However you don't use signals/slots directly on QStrings, it sounds like you want them on the button click.

        1 Reply Last reply
        0
        • M Meera Hadid

          I have a QString name this value changes whenever the button is clicked. Now I want to call a function update() whenever the name value changes.

          Thank YouT Offline
          Thank YouT Offline
          Thank You
          wrote on last edited by
          #4

          @Meera-Hadid

          You can do something like emitting signals on your own
          see more: https://doc.qt.io/qt-5/signalsandslots.html
          Create a slot , as you said update()
          What causes the button text to change emit signal there ,
          and it will execute things in slot

          As others have said , a basic example is required for what you want

          Let's make QT free or It will go forever

          TRUE AND FALSE <3

          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