We have moved to a new Sailfish OS Forum. Please start new discussions there.

Revision history [back]

click to hide/show revision 1
initial version

posted 2018-12-19 14:20:42 +0200

IconButton.source (Image) not recognized in QtCreator

I use an IconButton to allow the user to play back alarm sounds:

IconButton { icon.source: sound.playbackState === Audio.PlayingState ? "image://theme/icon-m-pause" : "image://theme/icon-m-play"; onClicked: { sound.source: selectedSound; if(sound.playbackState === Audio.PlayingState) { sound.stop(); } else { sound.play(); } } }

image description

As can be seen, the editor "doesn't know" about the source Image, and the same seems to apply for the Audio element:

Audio { id: sound; audioRole: Audio.AlarmRole; onError: { console.log("Audio error:", errorString) } }

IconButton.source (Image) not recognized in QtCreator

I use an IconButton to allow the user to play back alarm sounds:

IconButton { icon.source: sound.playbackState === Audio.PlayingState ? "image://theme/icon-m-pause" : "image://theme/icon-m-play"; onClicked: { sound.source: selectedSound; if(sound.playbackState === Audio.PlayingState) { sound.stop(); } else { sound.play(); } } }

image description

As can be seen, the editor "doesn't know" about the source Image, and the same seems to apply for the Audio element:

Audio { id: sound; audioRole: Audio.AlarmRole; onError: { console.log("Audio error:", errorString) } } I have no idea why the code rendering is so flawed here..?

IconButton.source (Image) not recognized in QtCreator

I use an IconButton to allow the user to play back alarm sounds:

IconButton { { icon.source: sound.playbackState === Audio.PlayingState Audio.PlayingState ? "image://theme/icon-m-pause" "image://theme/icon-m-pause" : "image://theme/icon-m-play"; "image://theme/icon-m-play"; onClicked: { { sound.source: selectedSound; selectedSound; if(sound.playbackState === Audio.PlayingState) { sound.stop(); { sound.stop(); } else { sound.play(); } } } { sound.play(); } } }

image description

As can be seen, the editor "doesn't know" about the source Image, and the same seems to apply for the Audio element:

Audio { { id: sound; sound; audioRole: Audio.AlarmRole; Audio.AlarmRole; onError: { { console.log("Audio error:", errorString) } } errorString) } } I have no idea why the code rendering is so flawed here..?

IconButton.source (Image) not recognized in QtCreator

I use an IconButton to allow the user to play back alarm sounds:

IconButton { icon.source: sound.playbackState === Audio.PlayingState ? "image://theme/icon-m-pause" : "image://theme/icon-m-play"; onClicked: { sound.source: sound.source = selectedSound; if(sound.playbackState === Audio.PlayingState) { sound.stop(); } else { sound.play(); } } }

image description

As can be seen, the editor "doesn't know" about the source Image, and the same seems to apply for the Audio element:

Image.

The rendering error with Audio { id: sound; audioRole: Audio.AlarmRole; onError: { console.log("Audio error:", errorString) } } sound.source: selectedSound; in the screen shot is fixed.

I have no idea why the code rendering is so flawed here..?

IconButton.source (Image) not recognized in QtCreator

I use an IconButton to allow the user to play back alarm sounds:

 IconButton { 
    icon.source: sound.playbackState === Audio.PlayingState 
        ? "image://theme/icon-m-pause"  
        : "image://theme/icon-m-play";  
    onClicked: {  
        sound.source = selectedSound;  
        if(sound.playbackState === Audio.PlayingState) {  
            sound.stop();  
        } else {  
            sound.play();  
        }  
    }  
}  
}

image description

As can be seen, the editor "doesn't know" about the source Image.

The rendering error with sound.source: selectedSound; in the screen shot is fixed.

I have no idea why the code rendering is so flawed here..?