0
点赞
收藏
分享

微信扫一扫

QColorDialog和QFileDialog的使用简单例子

想溜了的蜗牛 2022-01-13 阅读 80
qt
    QColorDialog dialog(Qt::red, this);
    dialog.setOption(QColorDialog::ShowAlphaChannel);
    dialog.exec();
    QColor color = dialog.currentColor();

    QString fileName = QFileDialog::getOpenFileName(this, tr("文件对话框"), "D:", tr("图片文件(* png * jgp)"));

举报

相关推荐

0 条评论