×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Apr 2011
    Posts
    16

    Scroll Area tab order problem

    I am implementing a scroll area that contains notifications and every 30 seconds...new notification are inserted i the scroll area.This application is for nontouch symbian devices...what really happens is that the notifictaion are inserted successfully, but the tab order is not correct

    QVBoxLayout* layout = qobject_cast<QVBoxLayout*>( ui->scrollAreaWidgetContents->layout());
    layout->insertWidget(0,notificationWidget);

  2. #2
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: Scroll Area tab order problem


  3. #3
    Registered User
    Join Date
    Apr 2011
    Posts
    16

    Re: Scroll Area tab order problem

    I solved the issue by installing event filter on the scroll area widget content and listen on the UP and down keys
    bool OnTheGoWindow::eventFilter(QObject* obj, QEvent *event)
    {
    if (obj == ui->scrollAreaWidgetContents)
    {
    if (event->type() == QEvent::ShortcutOverride)
    {
    QKeyEvent* keyEvent = static_cast<QKeyEvent*>(event);
    if (keyEvent->key() ==Qt::Key_Up)
    {
    focusPreviousChild();
    return true;
    }else if (keyEvent->key() ==Qt::Key_Down){
    focusNextChild();
    return true;
    }


    }

    return false;
    }
    return OnTheGoWindow::eventFilter(obj, event);
    }

Similar Threads

  1. Qt Designer and scroll area
    By bobford in forum [Archived] Qt SDKs and Tools
    Replies: 4
    Last Post: 2011-01-16, 04:33
  2. How to make a scroll area work?
    By nuthon in forum Qt
    Replies: 1
    Last Post: 2010-10-06, 08:20
  3. Replies: 3
    Last Post: 2009-03-19, 11:46
  4. Replies: 0
    Last Post: 2008-09-23, 07:49

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×