Removed NLoader in favor of Loader, as it was not doing anything anymore
This commit is contained in:
parent
c6eb613e38
commit
caffbe45e0
10 changed files with 65 additions and 115 deletions
|
|
@ -1,39 +0,0 @@
|
|||
import QtQuick
|
||||
|
||||
// Example usage:
|
||||
// NLoader {
|
||||
// content: Component {
|
||||
// YourComponent {
|
||||
Loader {
|
||||
id: loader
|
||||
|
||||
// Boolean control to load/unload the item
|
||||
property bool isLoaded: false
|
||||
|
||||
// Provide the component to be loaded.
|
||||
property Component content
|
||||
|
||||
active: isLoaded
|
||||
asynchronous: true
|
||||
sourceComponent: content
|
||||
|
||||
onActiveChanged: {
|
||||
if (active && item && item.show) {
|
||||
item.show()
|
||||
}
|
||||
}
|
||||
|
||||
onItemChanged: {
|
||||
if (active && item && item.show) {
|
||||
item.show()
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: loader.item
|
||||
ignoreUnknownSignals: true
|
||||
function onDismissed() {
|
||||
loader.isLoaded = false
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue