Hi
I have create the QTreeView object to get the list of the tree of
directories of Hard Disk.
It works very fine.
But, how can GET the name of directory ON WICH i click? What is the
property that contains the string of ITEM clicked?
Thank you
Giovanni
Please don't give me the link of QT classes, i have read them :-))
Here is my code.
#include "
hbqtgui.ch"
STATIC oWnd,oModello,oAlbero,oText
PROCEDURE main()
LOCAL oButton1
oWnd:=QMainWindow()
oWnd:resize(800,600)
oModello:=QFileSystemModel()
oModello:setRootPath("")
oAlbero:=QTreeView(oWnd)
oAlbero:resize(780,400)
oAlbero:move(10,10)
oAlbero:setIndentation(20)
oAlbero:setModel(oModello)
oAlbero:setSortingEnabled(.T.)
oAlbero:sortByColumn(0,0)
oAlbero:setColumnWidth(0,300)
oAlbero:setColumnWidth(1,100)
oAlbero:setColumnWidth(2,100)
oAlbero:setColumnWidth(3,100)
oButton1:=QPushButton(oWnd)
oButton1:setText("Inizia Conteggio")
oButton1:move(10,420)
oButton1:resize(150,30)
oButton1:Connect("clicked()",{ || inizio() } )
oText:=Qlabel(oWnd)
oText:setStyleSheet("background-color: yellow; color: red;" )
oText:setText("Hello World")
oText:move(170,420)
oText:resize(620,30)
oWnd:show()
QApplication():exec()
RETURN
PROCEDURE inizio()
oText:setText( "ciao" )
RETURN