04 2018 档案

摘要:QString string = QWidget::fontMetrics().elidedText("this is need elide",Qt::ElideMiddle,100); QWidget::fontMetrics.elidedText()用于省略一部分文字。fontmetric字体指 阅读全文
posted @ 2018-04-25 14:47 呵哈呵 阅读(4) 评论(0) 推荐(0) 编辑
摘要:QColor color = QColorDialog::getColor(Qt::red,this,tr("颜色对话框"),QColorDialog::ShowAlphaChannel); QColorDialog dialog(Qt::red,this); dialog.setOption(QC 阅读全文
posted @ 2018-04-24 17:17 呵哈呵 阅读(3) 评论(0) 推荐(0) 编辑
摘要:参考文章,很感谢! #ifndef WIDGET_H #define WIDGET_H #include <QWidget> namespace Ui { class Widget; } class Widget : public QWidget { Q_OBJECT public: explici 阅读全文
posted @ 2018-04-24 14:49 呵哈呵 阅读(66) 评论(0) 推荐(0) 编辑
摘要:qt的close和quit,一个是用来关闭窗口的,一个是用来关闭程序的,但是他们之间也有关系。qt手册里有 Closes this widget. Returns true if the widget was closed; otherwise returns false. First it sen 阅读全文
posted @ 2018-04-24 14:05 呵哈呵 阅读(57) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示