Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Screen rotation event and padding QTableView rows.

Screen rotation event and padding QTableView rows.

Scheduled Pinned Locked Moved Mobile and Embedded
1 Posts 1 Posters 729 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    adutzu89
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved