随笔分类 -  QT

摘要:r_menu->setWindowFlags(r_menu->windowFlags() | Qt::FramelessWindowHint); r_menu->setAttribute(Qt::WA_TranslucentBackground); HWND hwnd = reinterpret_cast(r_menu->winId()); ... 阅读全文
posted @ 2017-05-23 15:30 细雨细语 阅读(1696) 评论(1) 推荐(0)
摘要:void CPlaySlider::updatesliderstyle() { ui.suspend_slider->style()->unpolish(ui.suspend_slider); ui.suspend_slider->style()->polish(ui.suspend_slider) 阅读全文
posted @ 2017-04-27 20:24 细雨细语 阅读(844) 评论(0) 推荐(0)
摘要:QString str = fontMetrics().elidedText( string, Qt::ElideRight, ui->m_txtLabelMsg->width() ); 阅读全文
posted @ 2017-04-27 15:02 细雨细语 阅读(789) 评论(0) 推荐(0)
摘要:class login_window : public QWidget { Q_OBJECT protected: bool eventFilter(QObject * watched, QEvent * event); } ui.label_obj_sample->installEventFilter... 阅读全文
posted @ 2017-04-21 23:59 细雨细语 阅读(3685) 评论(0) 推荐(1)
摘要:1,2,3,QWidget *centralWidget; QGridLayout *gridLayout_3; QWidget *widget_main; QGridLayout *gridLayout; QTabWidget *widget_tab; QWidget *tab_view_3d; ... 阅读全文
posted @ 2017-04-13 11:56 细雨细语 阅读(1714) 评论(0) 推荐(0)
摘要:public: int countFlag(QPoint p, int row); void setCursorType(int flag); int countRow(QPoint p); protected: void mousePressEvent(QMouseEvent *event); v 阅读全文
posted @ 2017-04-13 11:49 细雨细语 阅读(4084) 评论(0) 推荐(0)
摘要:1, signals: void signal_show_attribute(bool); private slots: void show_attribute(bool);connect(this, SIGNAL(signal_show_attribute(bool)), this, SLOT(show_attribute(bool)));emit s... 阅读全文
posted @ 2017-03-29 10:24 细雨细语 阅读(1322) 评论(0) 推荐(0)
摘要:1,QComboBoxconnect(ui.load_combobox, SIGNAL(currentIndexChanged(int)), this, SLOT(load_sel(int)));bool ar_editor_window,::load_sel(int index){ //int s 阅读全文
posted @ 2017-03-14 21:26 细雨细语 阅读(356) 评论(0) 推荐(0)
摘要:1,下载源码http://download.qt.io/archive/qt/5.7/5.7.1/single/qt-everywhere-opensource-src-5.7.1.zip.mirrorlist2,或安装包http://download.qt.io/archive/qt/5.7/5.7.1/qt-opensource-windows-x86-msvc2015-5.7.1.exe安装... 阅读全文
posted @ 2017-02-28 21:42 细雨细语 阅读(449) 评论(0) 推荐(0)
摘要:1,QTextEdit *text_edit; text_edit->append(strline);//自动换行后输入strlinetext_edit->insertPlainText(str);//不还换接着输入str//设置背景色text_edit->setStyleSheet("QTextE 阅读全文
posted @ 2017-02-15 11:35 细雨细语 阅读(380) 评论(0) 推荐(0)
摘要:1,http://download.qt.io/official_releases/qt/5.7/5.7.1/qt-opensource-windows-x86-msvc2015_64-5.7.1.exehttps://www.qt.io/download-open-source/#section-22,http://download.qt.io/official_releases/vsaddin... 阅读全文
posted @ 2016-12-27 12:33 细雨细语 阅读(621) 评论(1) 推荐(0)
摘要:QTextCodec * BianMa = QTextCodec::codecForName ( "GBK" );QMessageBox::information(this, "提示", BianMa->toUnicode("中文显示!")); 其实也可以通过QString定义的静态函数,先转换成U 阅读全文
posted @ 2016-12-04 23:15 细雨细语 阅读(7814) 评论(0) 推荐(0)