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. Event on start of method and catch with eventfilter immediately
Qt 6.11 is out! See what's new in the release blog

Event on start of method and catch with eventfilter immediately

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.1k 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.
  • L Offline
    L Offline
    ladislav.kopecky
    wrote on last edited by
    #1

    Hi all,
    it is possible send event on the start of method, catch event and then continue code in method.

    I need create this system:

    1. start method where I will change image
    2. on start of this method send event - image will be changed
    3. then continue with code of changing image
    4. on the end of method send event that image changed

    I create library with image filters and I need sending events to main app where eventfilter catch events from library and modify GUI.

    Thank you Ladislav

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

      Hi and welcome to devnet,

      Are you sure you want an event or is it a signal ?

      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
      • L Offline
        L Offline
        ladislav.kopecky
        wrote on last edited by
        #3

        Hi,
        I don't know what is better approach for my purpoise. Currently I am using events at the end of method. And in main app class I have installed eventfilter to qApp.

        I need:

        1. Before I start working on image, send information "Now I will changing image - show progress - backup current image variable"
        2. Start changing image and at the end of algorithm send info "Image finished"

        Currently at the end of algorithm I am sending event "Image finished". So I wondered about create event in synchronize thread on the start of algorithm, but I don't know if this solve my problem.

        Requirement is write minimum code in main app. Every thing else I am coding as library and than link to main app.

        Thank you for advice

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

          Then it sounds that you should use signals and slots rather than events, like e.g. in Qt's Model/View implementation. For column insertion there's a signal emitted as well as once the column has been inserted.

          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

          • Login

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