Changeset 1010 for tests


Ignore:
Timestamp:
Aug 19, 2011, 5:03:19 PM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

tests: embedded: Don't hide widgets in stack.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/embedded/embedded.cpp

    r1004 r1010  
     1
    12#include <os2.h>
     3
    24
    35#include <QDebug>
     
    2830        layout->addWidget (stable);
    2931
    30         return stable->winId();
     32        WId id = stable->winId();
     33        qDebug() << "stable id" << qDebugHWND (id);
     34        return id;
    3135    }
    3236
     
    5559        /* menus */
    5660        {
    57             QMenu *actionsMenu = menuBar()->addMenu ("&Actions");
    5861            QAction *playAct = new QAction ("&Play", this);
    59             actionsMenu->addAction (playAct);
    60 
    6162            playAct->setShortcut (QKeySequence("Ctrl+P"));
    6263            playAct->setCheckable (true);
    6364            connect (playAct, SIGNAL (triggered(bool)), SLOT (playTriggered(bool)));
     65
     66
     67
     68
     69
     70
     71
     72
     73
    6474        }
    6575
     
    7585        stackCentralW = new QStackedWidget (main);
    7686
     87
     88
     89
     90
    7791        bgWidget = new QLabel ("Background");
    7892        stackCentralW->addWidget (bgWidget);
     
    8498
    8599        mainLayout->insertWidget (2, new QLabel ("Controls"));
    86 
    87100    }
    88101
    89102    void timerEvent (QTimerEvent *)
    90103    {
     104
     105
     106
     107
     108
     109
    91110        if (id)
    92111        {
     
    97116            {
    98117                RECTL rcl;
    99     //            WinQueryWindowRect (hwnd, &rcl);
     118            WinQueryWindowRect (hwnd, &rcl);
    100119
    101120                rcl.xLeft = 0;
     
    111130            }
    112131        }
     132
    113133    }
    114134
     
    121141            stackCentralW->setCurrentWidget (videoWidget);
    122142            id = videoWidget->request();
    123 //            timerId = startTimer (1000);
     143            timerId = startTimer (1000);
    124144        }
    125145        else
     
    128148            id = 0;
    129149            killTimer (timerId);
    130 //            timerId = 0;
     150            timerId = 0;
    131151            stackCentralW->setCurrentWidget (bgWidget);
     152
     153
     154
     155
     156
     157
     158
     159
     160
     161
     162
     163
    132164        }
    133165    }
Note: See TracChangeset for help on using the changeset viewer.