Qt Raspberry 3 Touchscreen official 7" Qpushbutton pb
I'm sorry for my english, i'm french :)
I'm writing you because i'm programming on a Raspberry 3 , with touchscreen 7" and Qt Creator 3.2.1 Based on Qt 5.3.2
My problem is with the QPusbutton.
It doesn't stop being activated.
I tried of used the function event but after setSheetStyle doesn't work any more.
MainWindow::MainWindow(QWidget *parent) :
ui->setupUi(this); B_Start=false; ui->MyButton->setStyleSheet("border-image: url(:/Ressource/Stop_Button.png)");
bool MainWindow::event(QEvent *event)
Hi and welcome to devnet,
Do you mean on_MyButton_clicked is not called anymore or that the image doesn't change ?
on_MyButton_clicked is alway called when my finger is on my Button .
Into my qDebug windows, i have :
If i insert a breakpoint on ui->MyButton->setStyleSheet("border-image: url(:/Ressource/Play_Button.png)");
MyButton change of StyleSheet
If I delete my function event.
MyButton doesn't stop to change of StyleSheet and on_MyButton_clicked is called looped
I missed that you had a custom event method. You should at least call the base class implementation otherwise you are breaking the handling of the events in your MainWindow.
Thank you for your reply.
Could you write me a quick example how write a call the base class implementation otherwise ?
This is basic C++, so if you are new to that programming language, don't hesitate to state it. It's not a crime and avoid people to assume the wrong level of knowledge when answering to you.
I tested ;)
You're welcome !
Since you have it working now, please mark the thread as solved using the "Topic Tools" button so other forum users may know a solution has been found :)