Changeset 481 for tests/widget/widget.cpp
- Timestamp:
- Jan 27, 2010, 10:09:56 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/widget/widget.cpp
r435 r481 250 250 MyWidget() : mPressed(0) 251 251 { 252 // setFocusPolicy(Qt::StrongFocus); 253 254 #if 1 252 #if 0 255 253 MyButton *btn1 = new MyButton(this); 256 254 btn1->setText(QLatin1String("&Hello (also Ctrl+H)")); … … 398 396 #endif 399 397 400 #if 1398 #if 0 401 399 void keyPressEvent(QKeyEvent *aE) 402 400 { … … 417 415 << QDbgStr(aE->text().isEmpty() ? QString() : 418 416 QString().sprintf("(%04X)", aE->text()[0].unicode())); 417 } 418 #endif 419 420 #if 1 421 // QCursor shape test 422 void mousePressEvent(QMouseEvent *aE) 423 { 424 static int shape = 0; 425 if (aE->button() == Qt::LeftButton) 426 ++shape; 427 else 428 --shape; 429 shape = (Qt::LastCursor + 1 + shape) % (Qt::LastCursor + 1); 430 setCursor(QCursor((Qt::CursorShape)shape)); 419 431 } 420 432 #endif
Note:
See TracChangeset
for help on using the changeset viewer.