Ignore:
Timestamp:
Nov 10, 2009, 3:26:21 PM (16 years ago)
Author:
Dmitry A. Kuminov
Message:

tests: widget: Added the QMenuBar test case.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/widget/widget.cpp

    r304 r311  
    9797    }
    9898
     99
     100
     101
     102
     103
     104
    99105    void focusInEvent(QFocusEvent *aE)
    100106    {
     
    120126public:
    121127
    122     MyButton(QWidget *aParent) : QPushButton(aParent) {}
     128    MyButton(QWidget *aParent) : QPushButton(aParent)
     129    {
     130        QMenu *menu = new QMenu(aParent);
     131        menu->addAction(QLatin1String("Action &1"));
     132        menu->addAction(QLatin1String("Action &2"));
     133        setMenu(menu);
     134    }
    123135
    124136#if 0
     
    239251//      setFocusPolicy(Qt::StrongFocus);
    240252
     253
    241254        MyButton *btn1 = new MyButton(this);
    242255        btn1->setText(QLatin1String("Hello 1"));
     
    263276
    264277//      setLayout(mainLayout);
     278
     279
     280
     281
     282
     283
     284
     285
     286
     287
     288
     289
     290
     291
     292
     293
     294
     295
     296
     297
     298
     299
     300
    265301
    266302#if 0
Note: See TracChangeset for help on using the changeset viewer.