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. Emitting initial signals/Application setup
Forum Updated to NodeBB v4.3 + New Features

Emitting initial signals/Application setup

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.4k 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.
  • E Offline
    E Offline
    eddyilg
    wrote on last edited by
    #1

    Hi,

    I am wondering if there is a good way to trigger signals (like "toggle", "change", "update", ...) from other objects during initialization.

    I am always getting the states of other objects by hand and setting them in the current class. Later on they are modified by signals. I am wondering if this "handwork" of getting the objects into a synchroniyzed initial state can be reduced somehow.

    Sometimes I imagine an initialization stage after the objects are created where all signals are fired once.

    What are your approaches?

    Best regards,

    Eddy

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      My approach for this kind of thing usually is, to have a single slot updateGui() or something like that. All signals that can result in an update of the Gui connect to that slot. In that slot, I put all the logic of updating the different Gui elements according to the relevant states (checked checkboxes, radiobuttons, selected items from combo boxes, etc. etc.).

      At the end of my constructor method, I simply call this method once to initialize the Gui state.

      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