Quantcast
Channel: QtWebEngine
Viewing all articles
Browse latest Browse all 13965

how to select and delete for images

$
0
0
hi , i displayed all the images from particular directory using foldermodel….everything is fine ….in this images i want to select particular image and i want to delete this image from my qml gui…how can i do please provide solution….below i attached my code please find it…     Rectangle{            width: parent.width-200            height: parent.height/3.6            anchors.bottom: parent.bottom            color: "transparent"            anchors.horizontalCenter: parent.horizontalCenter              ListView {                id:list_view_rm                anchors.fill: parent                width: 400; height: 600                clip: true              orientation: "Horizontal"                  FolderListModel {                    id: folderModel                    nameFilters: ["*.png"]                    folder: "Images"                }                  Component {                    id: fileDelegate                      Column {                        Rectangle{                            id:sss                           width: 250; height: 160                           border.color: "white"                           border.width: 2                           color:"transparent"                          Image {                            id:image_click                            anchors.fill: parent                            //anchors.centerIn: parent                            anchors.horizontalCenter: parent.horizontalCenter                            width: parent.width; height: parent.height                            fillMode:Image.PreserveAspectFit                            smooth: true                            source:folderModel.folder + "/" + fileName                                MouseArea{                                anchors.fill: parent                                onClicked: {                                }                              }                        }                        Text { text: fileName                        anchors.bottom: parent.bottom                    //    anchors.leftMargin: 20                        anchors.horizontalCenter: parent.horizontalCenter                        color: "white"                        font.bold: true                        }                    }                    }                  }                  highlight: Rectangle { color: "lightsteelblue"; radius: 5 }                  model: folderModel                delegate: fileDelegate            }            }

Viewing all articles
Browse latest Browse all 13965

Trending Articles