Qt Code:
ui->tree_Widget->setCurrentIndex(ui->tree_Widget->indexAt(p));To copy to clipboard, switch view to plain text mode
You can use this. Its not perfect, but it works. Maybe you have to change the 27.
Qt Code:
ui->tree_Widget->setCurrentIndex(ui->tree_Widget->indexAt(p));To copy to clipboard, switch view to plain text mode
You can use this. Its not perfect, but it works. Maybe you have to change the 27.
Sorry, but that is not a good answer. It depends on font size, row height, and any number of other variables unique to the PC where the app is running. On your PC, maybe the height of a row is 27, but on my PC, it probably isn't. The "indexAt( const QPoint & )" method is generally used to let the application know where a user clicked with the mouse, not in the way you are suggesting.You can use this. Its not perfect, but it works. Maybe you have to change the 27.
The answer in the original post is correct and should be used.
Bookmarks