Questions tagged [mousepress]
52 questions
0
votes
1 answer
Java - Create a button from a shape
I am learning Java currently and have been given the assignmnet of finidhing off a program to create the game Conways's life (we started with some code provided to us and must add features etc to this).
I am currently stuck on a menu option for the…

Cik02
- 59
- 6
0
votes
1 answer
pyqt5 QLabel Image setScaledContents(True) don't allow Qpainter updates
I want to display an image and put a marker at the current mouse position for every left mouse click.
Below code does the job however, it works only if ("self.imglabel.setScaledContents(True)") is commented. Any reason?
I have to do this job on…

mvpavan kumar
- 3
- 2
0
votes
1 answer
Using Java mousePress, mouseMove and mouseRelease for click-and-drag
I'm writing auto-tests for an openLayers web application (similar to Google Maps), trying to get it to click and drag to pan the map, as any user normally would.
After many attempts and research, I still cannot get it to pan automagically. This is…

Stuart
- 41
- 3
0
votes
2 answers
Qt: How to Find the Position of the Mouseclick Relative to an Image
I would like to implement an image editor. I have a QPixmap in a QLabel in a QHBoxLayout. I have overriden the mousePressEvent in the parent widget. When the mousePressedEvent occurs, the
event->pos() = QPoint(271,115)
points to a place which is…

user1396055
- 295
- 1
- 12
0
votes
1 answer
Robot not pressing mouse during mouse movement method
I am currently working on a basic utility software that has the ability to record Keyboard & Mouse input, save the input to a .txt file, and playback the data on a file. I am revising the program for added file and playback functionality. The…

Ryan
- 1
- 2
0
votes
2 answers
Getting position of mouse click in a QLabel
What is the best (as in simplest) way to obtain the pos of a mousePressedEvent in a QLabel? (Or basically just obtain the location of a mouse click relative to a QLabel widget)
EDIT
I tried what Frank suggested in this way:
bool…

wrongusername
- 18,564
- 40
- 130
- 214
0
votes
1 answer
Processing - mousePress image go to function
I have loaded and created two image buttons menuStart and menuExit withe menuStart.png and menuExit.png:
image(menuStart, 250, 350, 100, 42);
image(menuExit, 450, 345, 110, 45);
What I've doing:
I have set my pages as stages. stage 1 is a menu,…

user2990
- 15
- 1
- 8
0
votes
1 answer
How to create a mouse press in Jquery developing an application to Mobile?
I'm new in Jquery.
I'm developing a mobile application with HTML5 + CSS and JQUERY,
If I go to develop an application for Android with native code,
for example: I can use a function on listview, when the user presses for some seconds an action…

Joab
- 15
- 8
0
votes
1 answer
JButton shows different behavior with Simulated MousePress (Robot)
I wondering a bit why JButton does not shows "pressed" state after mouse press if I simulate it with Robot. The MouseEvents JButton receiving are exactly same, but outcome is different. Does Anyone know why?

andronix
- 124
- 9
0
votes
0 answers
QDoubleSpinBox + MousePressEvent
I am trying to implement my own version of the QDoubleSpinBox to have it act like in Maya with int/FloatFields so you can Ctrl+click+drag to change the value.
I have this system working on a QLabel by setting the text from my value but then when I…

Goffer
- 97
- 1
- 8
0
votes
1 answer
Mouse Pressed Event gets fired twice
I am trying to have it so once my mouse is pressed its gets fired once and only once. However, it keeps getting fired twice. I am not sure if this is because I am going through a for loop, but I want the mouse listener to catch what index of the…

user3339242
- 631
- 2
- 15
- 32
0
votes
1 answer
How to avoid mousePressEvent - left click to call paintEvent in PyQt
In this program below, I am testing the affect of mousePressEvent:
import sys
from PyQt4 import QtGui, Qt, QtCore
class Test(QtGui.QFrame):
def __init__(self):
QtGui.QFrame.__init__(self)
self.setGeometry(30,30,500, 500)
…

HuongOrchid
- 332
- 3
- 15
0
votes
1 answer
Program is not detecting mouse clicks
I am coding my very first game, but am having trouble getting my menu screen to work. Below is the code for my menu. I have been trying to test the exit button, but the program won't exit no matter where I click. I've also tried adding…

user3785016
- 1
- 1
0
votes
1 answer
JAVA Robot mouse event not working on login screen of oSX mavericks but works on lower version
I run a java application in login window using LaunchAgents ,which captures mouse and keyboard events remotely and executes it. The keyboard events work properly but not the mouse events.

user2493546
- 3
- 4
0
votes
2 answers
e.getY() return value higher than expected
When I press somewhere near Top-Left of the window, for some reason the output result for e.getY() is higher by about 40 than e.getX(). I don't see why... do you? Something is not clear to me regarding e.getY().
//BBDemo.java - The main program and…

NatiLevi
- 45
- 6