Send the signal to a delegate

Hello

I have a small question I would like to address. Basically, I have a TabbedPane in my main opinion, each of my tabs are delegated qml files. And I would like to connect the signal "onTriggered" tab to an action of a ListView that is declared in the delegate refreshment. But I don't know how to talk with the content of the delegate outside of it. Is it possible to do?

Just to make it easier to understand, here's some code. My main page is like this:

TabbedPane {
    id: mainTab
    showTabsOnActionBar: true

    Tab {
        id: tabFav
        title: qsTr("Favorite") + Retranslate.onLocaleOrLanguageChanged

        imageSource: "asset:///images/icon_favorites.png"

        delegateActivationPolicy: TabDelegateActivationPolicy.ActivateImmediately

        onTriggered: {

        }

        delegate: Delegate {
            id: favorite
            source: "Favorite.qml"
        }
    } //End of favorite tab
}

And Favorite.qml like this:

NavigationPane {
    id: nav

    Page {
    Container {
            layout: DockLayout { }

            ListView {
                id: listFav
            }

            function refresh() {
               // do some stuff
            }
     }
}

Is there a way to connect the signal onTriggered from the tab to the refresh() function in the Favorite.qml?

Thank you very much

Hello

Thank you for you answer. This is exactly what I wanted; the idea was: If you have the already active tab and hit again on the tab, it refreshes the display.

So if someone struck twice on the button, the second time "onActiveTabChanged" is not raised because it is already active, but I want to take this event to refresh the view.

But I found a solution:

TabbedPane {
    property variant favController
    property variant pmController

    Tab { //Favorite tab
        id: tabFav
        property bool isInitDone: false
        title: qsTr("Favorite") + Retranslate.onLocaleOrLanguageChanged

        imageSource: "asset:///images/icon_favorites.png"

        delegateActivationPolicy: TabDelegateActivationPolicy.ActivateImmediately

        onTriggered: {
            if(isInitDone)
                favController.getFavorite();
        }

        delegate: Delegate {
            id: favorite
            source: "Favorite.qml"
        }
    } //End of favorite tab

    Tab {
        id: tabPM
        property bool isInitDone: false
        title: qsTr("Message") + Retranslate.onLocaleOrLanguageChanged
        ActionBar.placement: ActionBarPlacement.OnBar
        imageSource: "asset:///images/icon_mp.png"
        delegateActivationPolicy: TabDelegateActivationPolicy.Default

        delegate: Delegate {
            source: "PrivateMessage.qml"
        }

        onTriggered: {
            if(isInitDone)
                pmController.getMessages();
        }

    } 

    onCreationCompleted: {
        tabFav.isInitDone = true;
    }

    onActiveTabChanged: {

        if(activeTab == tabFav) {
            tabFav.isInitDone = true;
            tabPM.isInitDone = false;
        }

        if(activeTab == tabMP) {
            tabFav.isInitDone = false;
            tabPM.isInitDone = true;
        }
    }
}
NavigationPane {

    Page {

        Container {
            layout: DockLayout { }

                ListView {
                  id: listFav
                }

             attachedObjects: [
                 ListFavoriteController {
                     id: listFavoriteController

                 }
                ]
        }

        onCreationCompleted: {
                listFavoriteController.setListView(listFav);                listFavoriteController.loadView();

// ---------------------------------- NEW --------------------------
                favController = listFavoriteController;// -----------------------------------------------------------------
            }
    }
}

So basically, when the Favorite.qml page is created, I provide a pointer to the controller of the TabbedPane. And then, it can process in the 'onTriggered '. I had to manage tab and change to avoid refreshing the page twice, but it seems to do the job.

Tags: BlackBerry Developers

Similar Questions

  • SSD drive, Toshiba canvio aeromobile wireless fails to send the signal

    disc ssd wireless works fine.
    copy files readings of wireless works fine
    WIRELESS DSS APP store updated without internet< strange="">
    after update 'wait 5 minutes and reconnect'
    Wireless hard drive fails to send a signal that can be picked up

    Troubleshooting

    Drive hard renovated,
    Reset hardrive with pen (button on the top of the car)
    turned on
    Turned on and waited 10 minutes

    hard drive flashing green on the battery indicator. Blue solid indicator of ssd wfi
    SD card is removed. seeing the card SD is out.

    I am at a loss.

    I have the exact problem right now
    And looks, no Toshiba is interested.

    I'll go back to bnh.com (where I bought the product) and give a BAD comment * 0000

    Posted by benjamin
    disc ssd wireless works fine.
    copy files readings of wireless works fine
    WIRELESS DSS APP store updated without internet< strange="">
    after update 'wait 5 minutes and reconnect'
    Wireless hard drive fails to send a signal that can be picked up

    Troubleshooting

    Drive hard renovated,
    Reset hardrive with pen (button on the top of the car)
    turned on
    Turned on and waited 10 minutes

    hard drive flashing green on the battery indicator. Blue solid indicator of ssd wfi
    SD card is removed. seeing the card SD is out.

    I am at a loss.

  • Qosmio G30 - 163 stops sending the signal HDMI

    Hello world

    I really love the Qosmio and took their retirement my G30 to support Media Center functions in our living room. It has replaced my orginal media center that I custome built about two years ago, and never gave me any problems.

    I've also implemented the Qosmio gently and it works great except for one thing. When I switch my TV and turn on again it the TV loses the HDMI signal. It obviously sends a signal to the laptop as its judgment (in standby mode) that the Qosmio means then is to activate the LCD on the laptop automatically, which I don't want. I want to signal to stay on TV. It wasn't a problem with my previous media center, so I'm pretty dumfounded why the Qosmio starts running automatically.

    When I want to get the picture back, I have to open the Qosmio, open display properties select single display (my "other manufacturer" 37 inches) and it works again. It is a pain because I want my qosmio to be permanently anchor because it is by far the BEST salon HTPC ever.

    Can someone help please?

    Thank you
    Erich

    Hey Buddy,

    It seems difficult, maybe there is an option that the qosmio does not recognize the TV signals?
    Be careful in the properties, maybe you can find something.

    I will explore a little for it, I want a Qosmio also and I want the fully automated machine on a platter without the need to touch. (keyboard/mouse wireless and remote control)

    Welcome them

  • Generated sending the signals to a remote computer in a network

    Hi guys, I am new to Labview and need help. I use Labview to generate a voice modulated signal and I want to send this signal to a remote computer (real-time). How can I do this, so that this voice signal is regenerated in the remote computer?

    Hi Sarah, thanks for the advice.

  • HDMI is not send the signal on external monitor once the laptop awakens from his sleep

    I have my TV as a second monitor for my laptop. I connected via HDMI. Once I leave my laptop a little past in mode 'sleep' and the screen loses the connection. Once I wake up the laptop, the monitor is not turning back on my desktop. It remains off. I disconnect and reconnect the HDMI and it does nothing. During this operation, my laptop screen flickers as when he connects to it, but nothing happens. My TV does not receive the signal, but the laptop says it's connected. What can I do to fix this? Thank you

    PS. I have to restart my laptop each time to allow to work my external monitor.

    Right-click anywhere in your option chart click homepage > output > and choose computer laptop + moniter

  • Send the signal current/voltage/USB DB25 to regulation of pump to

    Hi all!

    I want to control the speed of a pump with LabVIEW (Thermo Fischer FH100M, Manual) and so I have to send a current or a voltage signal to the pump. The pump has only one DB25 port. As my laptop is not a port DB25, I tried to control it with a USB converter.

    I had only a converter USB to DB9, so I started with (laptop) USB-DB9-DB25 (pump) > >.

    When I connect the pump on the USB port, it is instantly put in market, but in a strange way.

    Is it possible to use this configuration? Or is it possible to use at least USB-> DB25 (I have the Setup, see manual page 45/3-19)? Then, I would order that the cable companies.

    Or do you have other suggestions?

    Thank you very much in advance!

    Tobi

    Tobi,

    Stop it! Do not connect your converter to this device.

    When you say "Converter USB to DB9" are you referring to a USB converter to RS - 232? DB9 is just a connector and therefore DB25. TOU can wire anything to this connector.  Your converter is probably wired as a serial RS-232 port.

    The manual shows clearly on page 3-19 and the following pages that the control of the pump is NOT wired for RS - 232!  By looking at the speicifications for the inputs and outputs you shown on page 3-20 and 21 may damage the USB to RS-232 conveter or the controller of the pump by connecting them.

    To control this device you will need to a DAQ with analog input, analog output, material inputs digital, digital, outputs a counter. You will also need some external circuits such as transistors or relay static solod DC in proportion.

    Lynn

  • IM new to LabVIEW. Is it possible to send the signal to more than one parcel on a chart by using the value property of the graph node

    I'm new to LabVIEW. IAM trying to display two plots on a graph using the node property value charts. I tried to feed the two signals into a signal of fusion and then in the value property node, but it did not work. Then I tried to build a table of two signals and it powers the value of hardware node. It did not work. What escapes me, should I use the node property value this way?


  • Unable to send arbitrary signals of CC. Help. Please, I beg you.

    Hello people,

    I am a student of Btech working with Labview 2013. I managed to generate an arbitrary Signal through Labview 2013 version for my project. Now, I need to send the signal to Agilent 6642 power supply dc to ampilfication and it will be used for my experience. I am facing problem here.

    I use GPIB USB HS to send the signal, and when I send commands * IDN, is successfully reading and writing, which means I have all my software and drivers installed perfectly. I have installed in my pc control expert and NI MAX.

    I did a program (which is attached) in labview and the GPIB seems to read (signal ACTIVE/Green shows when it is executed).
    But I do not see it in the oscilloscope (Tektronix TDS 2024 B) which means something's wrong here. I need to see the signal as shown in the attached picture.

    I am new to labview and don't know much. Please help me with the Labview program as I want to see the signal in the oscilloscope as well.

    If a command is needed, let me know the order.

    I'm stuck. Help, please.

    Thank you.


  • or HOW the signal to timer front door stop in while loop?

    Good afternoon

    Could someone please help. I have a project that is very basic. It performs replication of the mastermind game in labview2009 VI. I have managed to do work, but as soon as all the conditions are true my last or door sends the signal for the moment stop button loop.

    In other words, there is no time for my 'congratulations chain' to show before the game resets. What I have to do is to put a timer between the final or gate and my stop button, but all the methods I've tried don't seem to work as the data types do not match.

    Please please please a little help

    Alex


  • Satellite A210-129: can I send the full HD signal on TV?

    Hello.

    I would like to ask if there is possibility to send videos in full hd laptop (it has only the D - Sub port). Thank you for your attention.

    Can you please tell me how to send the full HD signal from your laptop without HD-DVD player and HDMI output? I think that it cannot work.

    As far as I know that something like this is possible only on Qosmio G30 with HD-DVD and new Qosmio G40 player. The two laptops have the HD - DVD and HDMI output.

  • Wait signal generator complete the scan list before sending the next command

    I am writing a program for Agilent E4421B signal generator scan to list between a range of frequencies (ramp up to the maximum frequency and then back down to the original frequency) specified. The signal generator has only a list of 401 points, which is a problem when I want to wash over a wide frequency range. To work around this problem, I would like to perform several scans of list in a row. However, I can't figure out an effective way to "say" the program to wait until the previous scan has finished before sending a new order of scanning for the signal generator. Any ideas? For reference, I use Agilent ESG drivers series LabVIEW.

    Thank you!

    If you use standard VISA calls, I would say just that send the scan command, but add; * mutual fund? (operation ends?) make a query.  Then, run a VISA to read what's coming.  This indicates to the device to send a 1 to the output buffer when the scan is complete (or just about any other operation, also).  As you are waiting for a response, your computer will wait the amount of time to wait so he could see a response, it is not less, your way with the exact amount of time - no more - to be actually taken.

    A few warnings:

    (1) make sure that the time-out is longer than the length of most slow scan.

    (2) there are variants of the '1' being returned.  I saw '1', '01', and even "1.00E + 3" therefore to allocate more than one byte to read."

  • Companys keep the call telling me they are Microsoft and my computer to send them signals of error

    Original title: scammed

    Companys keep the call telling me they are Microsoft and my computer is sending wrong signals that I have been scammed by apturo for £145.00 already do I need help with my computer and these errors. Thanks much jam

    The game, 18 June 2015 13:01:55 + 0000, BobSummerville wrote:

    APTURO scam is alive and well... and I just fell for it.  I was scammed to the tune of $ 207,91 to solve a problem on my computer that did not exist.  Convincing, but aggressive, 'technician' called Microsoft Support had received reports that my computer had been compromised and that his company had the task to fix.  The malware to compensation would cost US$ 169.  I've stupidly it gave access to my computer for all 90minutes.  What he was doing right now that I don't know, but I just finished all my blocking bank accounts and change the passwords.

    It is not good enough, as far as I'm concerned.

    In addition to their money get on your part to do anything of any value,
    If you leave them in your computer, who knows what they were doing or where
    What confidential information they stole.

    So if you have done so, I highly recommend that you do both of the following
    immediately:

    1 do a clean reinstall of Windows.

    2. after reinstallation of Windows, change all your passwords.
    especially one of the banks or other financial sites. Once again, even do
    If you have just made.

    Since they have perhaps installed a recorder of strikes, changing just your
    Passwords may not be good enough.

  • My printer quit 4500 print but seems to be the signal by computer, it sends just 3 sheets w

    My printer quit 4500 print but seems to be the signal by computer, it sends just 3 sheets with nothing on it.

    I also have a 7 hp windows computer.

    Shane Merci for your comments. On this printer, I worked all day. I have restored my computer, used unhide.exe and about 8 others

    solutions. I guess I learned a lesson. You asked if I tried a color image. The reason was that I couldn't believe that I was low on ink.

    It's a nice new printer and the computer, but the color cartridge was full b & w was empty. I didn't try the obvious.

    dodgeredd

  • Cannot send the Dolby Digital XP on Satellite P100-347

    The problem I have is that I can't get the Dolby Digital to send from my laptop to my amp, apart from the use of the library. I have the portable (Tosh P100-347) connected to my amp via a SPDIF cable.

    Basically, in Media Center, I am able to change the settings, so that the amp captures the Dolby Digital signal, during playback of a DVD from the laptop, however, I am unable to get this transmitted signal during playback (HDTV) videos that are stored on my laptop. I know they are encoded with dolby digital.

    Also, if I use another player media, such as media player and media player classic, I'm not able to get the signal digital dolby conveyed either.

    I took a quick glance and think I have changed what is necessary, but still can't find anyway to do. I would get this sort you like playing HDTV content from my laptop and also play the latest games in dolby digital when available.

    Help, please.

    Hello

    Check please the sound properties in particular speakers and under Advanced settings, select speakers 5.1 surround sound.

    I hope this will be help!

  • Combine the signals

    Hey guys,.

    I try to combine the two signals, but I got an unexpected error when I combined a relay. According to me, I'm missing something here, and I've tried everything...

    Objective: The data entry follows different ways depending on the switch. If its follows the first input channel then the doesn´t signal to change, but if it goes to the second, then get delayed according to the TTL pulse generator. I m trying to use the "logical operations" block to combine the signals but I get an error and I have already tried with different blocks, but still getting errors

    It would be really nice if you can give me a tip

    Joint I m sending a picture of the arrangement and the error.

    Hugs,

    Celso


Maybe you are looking for