mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-16 12:06:55 +02:00
Add double-click to copy IP to clipboard to UI.
This commit is contained in:
parent
77683eda0c
commit
ea4269e0d2
3 changed files with 12 additions and 0 deletions
|
@ -104,3 +104,10 @@ void NetworkWidget::on_networkIdPushButton_clicked()
|
|||
{
|
||||
QApplication::clipboard()->setText(ui->networkIdPushButton->text());
|
||||
}
|
||||
|
||||
void NetworkWidget::on_ipListWidget_doubleClicked(const QModelIndex &index)
|
||||
{
|
||||
QListWidgetItem *ci = ui->ipListWidget->currentItem();
|
||||
if (ci)
|
||||
QApplication::clipboard()->setText(ci->text());
|
||||
}
|
||||
|
|
|
@ -29,6 +29,8 @@ private slots:
|
|||
void on_leaveNetworkButton_clicked();
|
||||
void on_networkIdPushButton_clicked();
|
||||
|
||||
void on_ipListWidget_doubleClicked(const QModelIndex &index);
|
||||
|
||||
private:
|
||||
Ui::NetworkWidget *ui;
|
||||
std::string networkIdStr;
|
||||
|
|
|
@ -338,6 +338,9 @@
|
|||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Double-click to Copy IP Address to Clipboard.</string>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
|
|
Loading…
Add table
Reference in a new issue