Questions tagged [mousepress]
52 questions
5
votes
2 answers
QPushButton setDown on click
When a QPushButton is clicked, I want it to remain pressed down until clicked again.
void MainWindow::itemClicked(){
QPushButton *clickedItem = qobject_cast(sender());
qDebug() << clickedItem->isDown();
…

Quaxton Hale
- 2,460
- 5
- 40
- 71
4
votes
3 answers
Why always calling mousePressEvent before mouseDoubleClickEvent
please consider the following code:
#include
#include
#include
class Widget : public QWidget
{
public:
void mousePressEvent(QMouseEvent* event)
{
std::cout << "mousePressEvent" < std::endl;
…

Eduard Rostomyan
- 7,050
- 2
- 37
- 76
4
votes
1 answer
Drawing line in QGraphicsScene with Qt
I have a problem with drawing lines. It works well when the mouse moves slowly, but when the mouse is moved faster, there are some gaps and I don't have any idea why. This is the…

Bartek El
- 43
- 1
- 3
4
votes
1 answer
How to get the exact location from a click on the qgraphicsscene in Qt
I am writing codes to load in image from a file and did some edits on this image(change some pixels' value), zoomed in or zoomed out and then save the image.
Also, I want to know the location in the original image associated to a click on the…

ivory
- 243
- 4
- 16
4
votes
1 answer
Libgdx why is my button not responding on mouseclicks
Why is my TextButton, from libgdx not responding on clicks?
I have a button, this button has a Listener, but it doesn't respond.
The button is showing, but it doesn't respond on mouse clicks.
public MyStage extends Stage {
...
…

Abdelkarim Abdoe
- 95
- 1
- 8
3
votes
1 answer
MousePressEvent in view and items in Qt
I have a custom QGraphicsView and a custom QGraphicsItem. I want the Item to handle my click if I click in the item, else I want the click to be handled by the View.
But when I click on the item, the item handles the click. This is ok. But if I…

fibera
- 495
- 3
- 8
- 15
2
votes
2 answers
Problems with mousepressevent
I just asked a similar question but (sorry!) I think I'll need more help. I have a problem with signals in pyqt. Let me post the whole code, it isn't long and it is easier for me to explain...
from PyQt4 import QtGui, QtCore, Qt
import time
import…

Matteo Monti
- 8,362
- 19
- 68
- 114
2
votes
1 answer
Autoclicker in Java for Skyrim
The program should do mouse clicks with a break in Skyrim.
It works fine but until I open the game it doesn't do mouse clicks, if I switch to windows it does work again. I don't understand why?
This is my code:
import java.awt.AWTException;
import…

Murat
- 23
- 5
2
votes
1 answer
How do I get to access and send I/O-device information, more specifically mouse move and click (press and release), from and to a game-client?
I am currently trying to make a program that will automatically accept a pop-up queue inside a game client. I have managed to get everything to work the way I want when not inside the client. However, when opening the game client, the robot class…

William
- 585
- 4
- 7
1
vote
3 answers
How to Detect that the Mouse is unmoved and button still pressed?
In Delphi, I've added a Scrollbar component (oriented vertical) to the right side of my form.
I've added a Scrollbar OnChange event so I can change the view of the form and the position of the scrollbar thumb when the user clicks on the UpArrow or…

lkessler
- 19,819
- 36
- 132
- 203
1
vote
3 answers
Processing mousePressed()
I'm new to coding and currently I'm in a class that has us use Processing 3 with java. I'm working on a project trying to set up a mousePressed() action, so that 3 static images appear but it's not showing up. (sorry if this is a stupid…

Marko
- 39
- 5
1
vote
2 answers
Trying to use multiple instances of Mouse pressed
I’m trying to add a feature where you can click on different parts of the sketch and have an image randomly generated. It worked for the first time, but when I add another if mouse pressed function, it triggers all the mouse pressed code and all of…

Ashley.a
- 11
- 1
1
vote
1 answer
How to display the contents in an array by using mouseListener?
I'm doing a program in which there are 8 shapes contained in an array that will be displayed when you click the mouse. I am new to Java and not that familiar with event handlers and listeners.
I am trying to make the shapes appear at the location…

hendselp
- 13
- 5
1
vote
1 answer
Simulate multiple click on a mouse press python
So I tried to simulate multiple mouse left click whenever I press the mouse's left button.However, my mouse start teleporting/moving slowly whenever I run my code. I am actually running this code with pycharm IDE.
I thought that maybe I am sending…

Skymo
- 11
- 2
1
vote
1 answer
P5.js mousePressed() function not working :/
I have all of p5 installed and that is working fine, however whenever I come to use mousePressed() it does not work (keyPressed does not work either). Here is the part with the problem:
//press play button
if (mouseX > 120 && mouseX < 480 &&…

Alfie Atkinson
- 58
- 1
- 10