automatic key ?
-
Hi
Its a little vague what you want to do :)You mean press a key in your own app for some other app ?
-
i just want to automatic reload and display infomation to a widget by Key_F5 but not touch F5 .
@Duy-Khang
well you can try sending it a key event (up and down events)QKeyEvent * eve1 = new QKeyEvent (QEvent::KeyPress,Qt::Key_F5,Qt::NoModifier,"F5"); QKeyEvent * eve2 = new QKeyEvent (QEvent::KeyRelease,Qt::Key_F5,Qt::NoModifier,"F5"); qApp->postEvent((QObject*)ui->thewidget,(QEvent *)eve1); qApp->postEvent((QObject*)ui->thewidget,(QEvent *)eve2);
Does F5 normally call your own code or is it a widget HTML browser and it is its code ?
-
Hi,
Looks like picture 2 is a dialog, so if you are using exec, just update the content of picture 1 and it will be refreshed automatically.
Other than that, you should provide more information about what is picture 1.
-
@Duy-Khang It all depends on how the picture-2 data is populated?
if this information is through database of student? then ,
in picture-1 you are having "Update" button right? Store the updated information into database first and reload the picture-2 to reflect that data is updated.