feat: QListWidget and QToolButton
列表控件QListWidget和工具按钮QToolButton的介绍和使用
This commit is contained in:
parent
0e576ff9aa
commit
5bbd3229ef
@ -214,3 +214,9 @@ void ExQListWidget::on_listWidget_customContextMenuRequested(const QPoint &pos)
|
||||
menu->exec(QCursor::pos()); //在鼠标光标位置显示右键快捷菜单
|
||||
delete menu; //手工创建的指针必须手工删除
|
||||
}
|
||||
|
||||
//退出
|
||||
void ExQListWidget::on_actExit_triggered()
|
||||
{
|
||||
this->close();
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ private slots:
|
||||
void on_actSelInvs_triggered(); //反选已筛选的item
|
||||
void on_listWidget_currentItemChanged(QListWidgetItem *current, QListWidgetItem *previous); //显示当前item的变动
|
||||
void on_listWidget_customContextMenuRequested(const QPoint &pos); //ListWidget弹出鼠标右键菜单
|
||||
void on_actExit_triggered(); //退出软件
|
||||
|
||||
private:
|
||||
void setActionForToolBtn(); //创建cation和toolButton的关联
|
||||
|
@ -34,7 +34,7 @@ HEADERS += \
|
||||
FORMS += \
|
||||
ExQListWidget.ui
|
||||
|
||||
#RC_ICONS += qt.ico
|
||||
RC_ICONS += qt.ico
|
||||
|
||||
# Default rules for deployment.
|
||||
qnx: target.path = /tmp/$${TARGET}/bin
|
||||
|
Loading…
Reference in New Issue
Block a user