Quicktime X – How to hide mouse during screen capture?

QuickTime itself does not seem to offer this functionality therefore you have to resort to some other means to hide the cursor. On OSX there are some tools that allow this. Cursourcerer is the first that springs to mind. However, as this really hides the cursor, it might not be ideal as you yourself will … Read more

Getting MouseMoveEvents in Qt

You can use an event filter on the application. Define and implement bool MainWindow::eventFilter(QObject*, QEvent*). For example bool MainWindow::eventFilter(QObject *obj, QEvent *event) { if (event->type() == QEvent::MouseMove) { QMouseEvent *mouseEvent = static_cast<QMouseEvent*>(event); statusBar()->showMessage(QString(“Mouse move (%1,%2)”).arg(mouseEvent->pos().x()).arg(mouseEvent->pos().y())); } return false; } Install the event filter when the MainWindows is constructed (or somewhere else). For example MainWindow::MainWindow(…) { … Read more

Javascript: Capture mouse wheel event and do not scroll the page?

You can do so by returning false at the end of your handler (OG). this.canvas.addEventListener(‘wheel’,function(event){ mouseController.wheel(event); return false; }, false); Or using event.preventDefault() this.canvas.addEventListener(‘wheel’,function(event){ mouseController.wheel(event); event.preventDefault(); }, false); Updated to use the wheel event as mousewheel deprecated for modern browser as pointed out in comments. The question was about preventing scrolling not providing the right … Read more

How do I drag and drop a row in a JTable?

The following allows JTable re-ordering of a single dragged row: table.setDragEnabled(true); table.setDropMode(DropMode.INSERT_ROWS); table.setTransferHandler(new TableRowTransferHandler(table)); Your TableModel should implement the following to allow for re-ordering: public interface Reorderable { public void reorder(int fromIndex, int toIndex); } This TransferHandler class handles the drag & drop, and calls reorder() on your TableModel when the gesture is completed. /** … Read more

tech