Qjay a day ago
I have a main.qml file that has a drawer in it .
Qt Code:
  1. // some imports
  2. //Some code
  3. Drawer {
  4. id: drawer
  5. width: Math.min(window.width, window.height) / 3 * 2
  6. height: window.height
  7. onOpened:
  8. webview.visible = false
  9.  
  10. onClosed:
  11. webview.visible = true
  12.  
  13. ColumnLayout {
  14. anchors.fill: parent
  15. Rectangle {
  16. id: search_field
  17. width: drawer.width
  18. height: 50
  19. // some code
To copy to clipboard, switch view to plain text mode 

2nd qml file
Qt Code:
  1. import QtQuick 2.6
  2. import QtQuick.Layouts 1.1
  3. import QtQuick.Controls 1.3
  4. import QtQuick.Window 2.2
  5. import QtQuick.Dialogs 1.2
  6. import QtQuick.Layouts 1.1
  7. import QtQuick.Controls 2.0
  8. import en.wtl.org 1.0
  9. import en.wtl.model 1.0
  10. import QtWebView 1.1
  11.  
  12. Pane{
  13.  
  14. id: view
  15. property string local_url : ""
  16. property string pid : ""
  17.  
  18.  
  19. ListView {
  20. width: 200; height: 250
  21.  
  22. model: myModel
  23. delegate: Component{
  24. RowLayout{
  25. Button {
  26. id: name
  27. text: title
  28. visible: true
  29. Layout.fillWidth: true
  30. onClicked: {
  31.  
  32. local_url = path+"/WTL_appdata/"+id+"/"+id+".html"
  33. console.log(local_url);
  34. pid = id;
  35. //webview.url = local_url
  36. webview.visible = true
  37. }
  38.  
  39. }
  40. }
  41.  
  42. }
  43. }
  44.  
  45.  
  46.  
  47.  
  48. WebView{
  49. id: webview
  50. url: "file:///"+path+"/WTL_appdata/"+pid+"/"+pid+".html"
  51. visible: false
  52. anchors.fill: parent
  53.  
  54. }
  55.  
  56. }
To copy to clipboard, switch view to plain text mode 
what i want to do is set the "webview.visible = true only when drawer onclosed property is true and set it to invisible when drawer onopened property is true .

so question is how can i access this
Qt Code:
  1. onOpened:
  2. webview.visible = false
  3.  
  4. onClosed:
  5. webview.visible = true
To copy to clipboard, switch view to plain text mode 

in my 2nd qml file .