Changeset 55038 in vbox
- Timestamp:
- Mar 31, 2015 2:25:29 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIAddDiskEncryptionPasswordDialog.cpp
r55016 r55038 166 166 /** Returns whether the table is valid. */ 167 167 bool isValid() const; 168 169 /** Initiates the editor for the first index available. */ 170 void editFirstIndex(); 168 171 169 172 private: … … 430 433 } 431 434 435 void UIEncryptionDataTable::editFirstIndex() 436 { 437 AssertPtrReturnVoid(m_pModelEncryptionData); 438 /* Compose the password field index of the first available table record: */ 439 const QModelIndex index = m_pModelEncryptionData->index(0, UIEncryptionDataTableSection_Password); 440 /* Navigate table to the corresponding index: */ 441 setCurrentIndex(index); 442 /* Compose the fake mouse-event which will trigger the embedded editor: */ 443 QMouseEvent event(QEvent::MouseButtonPress, QPoint(), Qt::LeftButton, Qt::NoButton, Qt::NoModifier); 444 /* Initiate the embedded editor for the corresponding index: */ 445 edit(index, QAbstractItemView::SelectedClicked, &event); 446 } 447 432 448 void UIEncryptionDataTable::prepare() 433 449 { … … 533 549 connect(m_pTableEncryptionData, SIGNAL(sigDataChanged()), 534 550 this, SLOT(sltDataChanged())); 551 m_pTableEncryptionData->setFocus(); 552 m_pTableEncryptionData->editFirstIndex(); 535 553 /* Add label into layout: */ 536 554 pInputLayout->addWidget(m_pTableEncryptionData);
Note:
See TracChangeset
for help on using the changeset viewer.

