Change the ImageView source in C++

Hi guys

I'm trying to edit an ImageView in C++ source

I first link QML and C++, can I change the source as in the reference Images

toplogo = root->findChild ("toplogo");

toplogo-> setImageSource(QUrl("assets/images/logo.png"));

The image exists, however, the program crashes and the log indicates that there is no source.

I tried QUrl errors for different combinations of URL of the image of logging:

qDebug()< "error="" url:"=""><>
qDebug()< "error="" url:"=""><>
qDebug()< "error="" url:"=""><>
qDebug()< "error="" url:"=""><>
qDebug()< "error="" url:"=""><>
qDebug()< "error="" url:"=""><>
qDebug()< "error="" url:"=""><>
qDebug()< "error="" url:"=""><>

But the newspaper still prints for all attempts:

URL ERROR: ' invalid URL 'asset:///images/logoideas.png' ":" '.

Any ideas would be appreciated.

Pepe

You must use the property objectName (not the id property) > please see my post above

in QML

ImageView {}
objectName: "'toplogo" "

}

 

 toplogo-> setImageSource (QUrl("asset:///images/logoideas.png"));)<- app="" crashes="">

It hangs here probably topLogo is NULL

If {(topLogo)

 toplogo-> setImageSource (QUrl("asset:///images/logoideas.png"));)

}

Tags: BlackBerry Developers

Similar Questions

  • Change the data source in my ApplicationModule

    Studio Edition Version 11.1.1.3.0

    I have the following problem:
    in WLS 10.3 I've defined three global DataSource (or several)

    and I have only a single ApplicationModule. Can I change the data source in my ApplicationModule (by code)?

    THX Thomas

    Envoy

  • OBIEE Mapviewer 11.1.1.7.1 cannot change the data source

    Hi all

    I am trying to configure mapviewer on our environment and after

    by clicking on configuration

    Add the DB details

    Save & Restart is updated the file xml but not displayed on the data source tab.

    But where as the other details of DB, I am able to add without problem, then if I click on change by selecting the data source to add/edit the details required to DB I get following error.

    Source of data editing is not yet supported. However, you can delete and re-create it with the new settings.

    and on the Management tab is not showing me any option to add the new source of data manually.

    someone has encountered this problem before. TIA

    Maybe the connection details are wrong, you see something in the Map Viewer logs files?

    under FMW_HOME/Oracle_BI1/bifoundation/jee/mapviewer.ear/web.war/WEB-INF/log/mapviewer.log

  • dynamically change the video source flv to flv play back...

    Dear friends,

    IAM trying to load flv files in flash using flvplayerback components. IAM using the following code. Initially, iam loadign video1.flv. So I want to load video2.flv when I press the next button. It loads video2 only when I press the next button after completing the full video1. I want to change the source at any time please tell the right way.

    Import fl.video.VideoProgressEvent;
    Import fl.video.VideoEvent;
    PLR.source = "video1.flv";


    plr.addEventListener (VideoProgressEvent.PROGRESS, showmsg);
    function showmsg(event:ProgressEvent) {}
    If (plr.bytesTotal == plr.bytesLoaded) {}
    trace ("Loaded");
    loaderpic. Visible = false;
    }
    }

    plr.addEventListener (VideoEvent.COMPLETE, complete);
    function comple(event:VideoEvent) {}
    trace ("film completed");
    }

    nxt.addEventListener (MouseEvent.CLICK, nxtclick);
    function nxtclick(event:MouseEvent) {}
    PLR. Stop();
    PLR.source = "video2.flv";
    PLR. Play();
    }

    Thanks in advance,

    Syed Abdul Rahim

    The code that show you works fine for me when I put things up to match.  When the button is clicked the first video is stopped and another replaces it.  Maybe you have another code that interferes.

  • Change the video source (even video but better quality)?

    Is it possible to change the video from the source of a project with another video which is exactly the same (same fps, same proportions, same time) video, but with better resolution, where all the changes on the last video source will remain on the new video source?

    My situation is that I found a version 720 p 480 p video, I worked (long) with.

    As Jim said, you can do outdoors.

    Sometimes we run with proxy support and who in the Proxy file with the quality full folder native (or ProRes).  You can either share the folder names, move files or in Premiere Pro, you can take the files offline then back online by right-clicking and choose reconnect media.

    This is the easiest part

    If you've been editing on a timeline of 480 p, then through 720 p images bringing you either have to change the settings for the sequence (you can also create a new sequence with the right settings, then copy/paste) or you need to tell Premiere Pro videos 720 p to 480 p sequence size nationwide.

  • Changing the SQL source region according to requirement

    I have a region of reports that shows the results of some SQL codes. According to the value of a variable to the page I need to run a little different from SQL to get my results. Right now I use 5 different regions and display one suitable and hide others, according to the value of the variable on the page.

    It's a bit messy and I'm looking for a better way to do it. Is it possible to use a single region and change the SQL used as the source of the region after checking my page variable? for example something like this for the source of the region:
    IF :report_type = 1 THEN
    
    SELECT col1, col2, col3 from table1;
    
    ELSEIF :report_type = 2 THEN
    
    SELECT col1, col2, col3 from table2;
    
    ELSEIF :report_type = 2 THEN
    
    SELECT col1, col2, col3 from table3;
    
    END IF;
    .. or something similar?

    Or is there an even easier way to do it?

    Hello

    for "normal" (non-interactive reports), you can provide a block plsql returning a sql query
    as the source of report...

    declare
    v_sql varchar2 (4000);
    Start
    IF: report_type = 1 THEN
    v_sql: = "SELECT col1, col2, col3 from table1";
    ELSE IF: report_type = 2 THEN
    v_sql: = "SELECT col1, col2, col3 from table2";
    ELSE IF: report_type = 2 THEN
    v_sql: = "SELECT col1, col2, col3 from table3";
    END IF;
    Return v_sql;
    end;

    as said - this does not work with interactive reports...

    Best regards

    Carsten-

  • Change the input source

    I can't use Ctrl + space to switch the input source, why?

    because the command is CTRL + space.

  • change the data source

    I two oracle database, we're for the objective test and another is for production, same table, same name of schema structure there... but diff tns. My question is how quick test for the production of simple way? I tried just add two pool of connections under a schema in the physical layer, but it does not seem to work, can anyone help with a this? Thanks in advance!

    Ishmael

    You can have a single Pool of connections for this requirement. Double click the Connection Pool and change the DSN, user id and password and and keep the RPD when you want to pass the tests of production, or vice versa.

  • Change the BitmapImage source on a decision-making event

    Hello

    I have a BitmapImage and I would like to change its source during execution.

    <BitmapImage source="img1.png" id="img" smooth="true" smoothingQuality="high"
          
    transformX="102" transformY="162">
       
    <filters>
           
    <DropShadowFilter distance="-1" angle="45"/>
       
    </filters>
    </BitmapImage>


    In the script part, I change its source so that it points to another picture.


    img.source = "img2.png";

    If the previous assignment is inside the mouseDown Manager, it works perfectly. But if I place it in a method that is triggered when data is received via a socket, the source remains unchanged.

    What I have discovered so far is: I added an event listener for the type "sourceChanged" and it is actually triggered, but when I inspect the source, point it to the old image.

    Thank you!

    Hello

    It turned out to be a bug in my code, completely independent of sockets or anything else.

    Not sure how to proceed... should I close this post?

  • Change the Image Source programmatically

    Hello

    I have a problem changing my source of image based on a value in a variable.

    The following function gets the shot, but I'm getting a TypeError: Error #1009: cannot access a property or method of a null object reference. error.

    I tried embedding, and the solution you see below (I've found here - as I am chaning to run time http://forums.adobe.com/message/116979#116979), but no luck

    I'm sure its how I am mapping the png, but I can't be sure... any suggestions?  I was banging my head against my desk for centuries on this!

    function (note: track proves that the value to modify the image is correct)

    public void LeversComplete (): void {}

    if (PodContentBase._ProjectDetail.getItemAt (0).) IndustryLeadingMastery is "N")

    trace ("Value" + PodContentBase._ProjectDetail.getItemAt (0).) IndustryLeadingMastery)

    imgIndustry.source = ' / assets/bigcheese.png ";

    else {imgIndustry.source = ' assets/Nocheese.png'}

    }

    Image (note - it is placed as a default - default settings and in fine)

    < mx:Image id = "imgIndustryleadingtechnicalmastery"

    source="assets/bigcheese.png"/ >

    Photo of the Directory Structure:

    path.JPG

    A few questions... The 'id' settings are different in your example.  In your actionscript code, the id is "imgIndustry" but in the mxml the id is "imgIndustryleadingtechnicalmastery".  Pass, how do you know that your image has been created yet, which is often a source of null pointer exceptions.  Whenever I think that this is a problem, I do something like that

    ... AS3...

    [Bindable] public var imageSource:Object;

    ... MXML...

    If in fact the problem is that the image is not created, it will solve it because the image will go and get its source when it is good and ready.

  • Change the audio source

    I have some hearing aids Starkey that my iPhone 6 passes to for a phone call.  Since iOS 10 has been installed, it doesn't seem to be an easy way to stop the streaming so I can put off the phone to someone to hear it.  I used to drag up from the bottom and he gave me the opportunity to move to phone audio, speaker, or hearing aids.  This possibility seems to have disappeared.  Any suggestions?

    Still, you drag to the top of the bottom, and now there are two options, you will need to slide from right to left to the option of audio source.

  • change the video source on the fly

    something like this:

    private function micChanged(event:Event):void
                   {
                        
                        audioPub.stop();
                        audioPub.microphoneManager.micIndex = micSelection.selectedIndex;
                        audioPub.publish();
                   }
    

    but it doesn't work...

    Hello

    You may need to wait that the stream has been removed i.e. listen event StreamEvent.STREAM_DELETE in the audio editor and after that set the Manager of the microphone and then you post.

    Do you use multiple microphones/cameras?

    Thank you

    Hironmay Basu

  • How to change the strong source of size?

    Is it possible to do this?

    That's not scale.

    CTRL + SHIFT + Y = layer--> Layer Properties

    Mylenium

  • Change the source of entry with the Caps Lock key does not

    It should be possible to change the input source with the Caps Lock key on macOS Sierra.

    and I checked "Toggle ABC of input source with caps lock shift" in system preferences > keyboard > input Source.

    However, it does not lock shift still only works as long as CapsLock

    I tried to reboot, reset the keyboard shortcuts, deactivation of Siri, reset NVRAM and reset the SMC, but still does not.

    I use only the default input source and have not installed and related programs to the keyboard or input source.

    Can anyone help?

    Thanks in advance.

    Greetings slwsbl!

    Thank you for using communities of Apple Support.

    I see that you want to change the input source with the SHIFT key on macOS Sierra. I understand the importance of wanting to use a specific key when changing inputs. I'm happy to help you with this.

    It is possible to do. Please take a look at the User Guide helps Mac, specifically, this section:

    Switch between input sources

    To switch between input sources, do one of the following:

    • Use the menu entry: Click on the menu entry in the menu bar, and then choose the input source. If an input source is dimmed, the current application does not support it.

    • Use the Caps Lock key: Press the caps lock shift key to switch between a non-Latin input (such as the Chinese or Korean) source and an input source Latin (for example, French or English).

      To use this method, you must select the option "use Caps Lock to toggle to and from" in the stream of input methods. Choose the Apple menu > System Preferences, click keyboard, and then click input methods.

    • Use keyboard shortcuts: Press control-Option-space bar to select the source of the following entry in the menu entry, or control-space to select the previous input source.

    Best regards.

  • How to change values record source based on the target account

    Hello

    What is the best way to change the record source of the members of the target value. For example, I want to multiply the record with X, if the target account is XXX, C1 is XXXX or if account target YYY and C1 is AAAA. I know using SQL, it you will be very easy, but, at some point to end users should be able to change it.

    Any ideas are appreciated.

    PM

    I think you should take a look at the accounts of logic, because this will help you reach your fitness and will be manageable by the end users.

Maybe you are looking for