Changeset 435

Timestamp:
Dec 22, 2009, 12:42:55 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

tests/widget: Added buttons with shortcuts testcase.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/widget/widget.cpp

    r426 r435  
    252252//      setFocusPolicy(Qt::StrongFocus);
    253253
    254 #if 0
     254#if
    255255        MyButton *btn1 = new MyButton(this);
    256         btn1->setText(QLatin1String("Hello 1"));
    257         btn1->setObjectName("Hello 1");
     256        btn1->setText(QLatin1String(""));
     257        btn1->setObjectName("Hello");
    258258        btn1->move(20, 20);
     259
     260
     261
     262
    259263        MyButton *btn2 = new MyButton(this);
    260         btn2->setText(QLatin1String("Hello 2"));
    261         btn2->setObjectName("Hello 2");
     264        btn2->setText(Q"));
     265        btn2->setObjectName();
    262266        btn2->move(20, 60);
     267
     268
     269
    263270
    264271//      QComboBox *cb1 = new MyCombo(this);
     
    270277//      cb2->addItem(QLatin1String("Test 4"));
    271278
    272 //      QVBoxLayout *mainLayout = new QVBoxLayout();
    273 //      mainLayout->addWidget(btn1);
    274 //      mainLayout->addWidget(btn2);
     279      QVBoxLayout *mainLayout = new QVBoxLayout();
     280      mainLayout->addWidget(btn1);
     281      mainLayout->addWidget(btn2);
    275282//      mainLayout->addWidget(cb1);
    276283//      mainLayout->addWidget(cb2);
    277284
    278 //      setLayout(mainLayout);
     285      setLayout(mainLayout);
    279286#endif
    280287
     
    306313
    307314    };
     315
     316
     317
     318
     319
     320
     321
     322
     323
    308324
    309325#if 0
     
    382398#endif
    383399
    384 #if 0
     400#if
    385401    void keyPressEvent(QKeyEvent *aE)
    386402    {
     
    593609#endif
    594610
    595 #if 1
     611#if
    596612    //--------------------------------------------------------------------------
    597613    // QSettings test
     
    613629    }
    614630
    615     qDebug() << "Modified Time key in MySoft/MyApp (system & user)";
     631    qg() << "Modified Time key in MySoft/MyApp (system & user)";
    616632#endif
    617633
     
    650666#endif
    651667
    652 #if 0
     668#if
    653669    QRect r = QApplication::desktop()->availableGeometry();
    654670    MyWidget widget;
     
    679695#endif
    680696
    681 #if 1
     697#if
    682698    //--------------------------------------------------------------------------
    683699    // QFileDialog test
Note: See TracChangeset for help on using the changeset viewer.