How do I set Click, Doubleclick and rightClick in QListView? I want to create a very simple file browser but I cant find out what signal connect. Thanks.
How do I set Click, Doubleclick and rightClick in QListView? I want to create a very simple file browser but I cant find out what signal connect. Thanks.
Have a look at QAbstractItemView::clicked and QAbstractItemView::doubleClicked . Hope they do the work for you
I tried those... I write this:
Qt Code:
To copy to clipboard, switch view to plain text mode
This is what I get:
Qt Code:
Object::connect: (sender name: 'list') Object::connect: (receiver name: 'MainWindowClass')To copy to clipboard, switch view to plain text mode
I think I may be referencing the wrong class somewhere. But Im 100% sure I made a total mess with the connect signal-slot
Last edited by been_1990; 28th April 2009 at 00:22.
Qt Code:
//... { //... }To copy to clipboard, switch view to plain text mode
been_1990 (28th April 2009)
yes, but if you don't need this variable you can use this connection
Qt Code:
//... void YourClass::run() { //... }To copy to clipboard, switch view to plain text mode
Qt Assistant -- rocks!
please, use tags [CODE] & [/CODE].
I actually need it a lot! How do I acess it? Do I write: const QModelIndex &myVariable ?
uncomment index in run or you can use QListView::currentIndex in run and don't pass QModelIndex in it.
Qt Assistant -- rocks!
please, use tags [CODE] & [/CODE].
been_1990 (28th April 2009)
Thank you!
Bookmarks