Screen rotation event and padding QTableView rows.
-
I have 2 question, I know one is for general forum but I hope it's ok if I start only 1 thread for 2 issues.
Os targeted is Android.First issue:
I installed a event filter for progress dialogs because for some strange reasons they pop-up in the top left corner of the screen, but it won't move if the screen rotates.
Here is the eventfilter:
@bool camer::eventFilter(QObject *obj, QEvent *ev){
if(obj==progres){
if(ev->type()==QEvent::Show || ev->type()==QEvent::OrientationChange){
progres->resize(this->width(),progres->height());
progres->move(0,this->height()/2-progres->height()/2);
return true;
}
else{
return false;
}
}
else{
return QObject::eventFilter(obj,ev);
}
}@Am I doing something wrong? The event triggers when the dialog is shown, but not when orientation is changed.
My second question is: How to add padding to rows? I tried using stylesheet padding,padding-top/padding-bottom, but none of these adds padding to the rows, the selectors is ok because if I change the background-color it works.