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.
Printable View
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:
This is what I get:
Code:
Object::connect: (sender name: 'list') Object::connect: (receiver name: 'MainWindowClass')
I think I may be referencing the wrong class somewhere. But Im 100% sure I made a total mess with the connect signal-slot:o:D
Code:
//... { //... }
yes, but if you don't need this variable you can use this connection
Code:
//... void YourClass::run() { //... }
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.
Thank you!