当前位置: 首页>>代码示例>>C++>>正文


C++ QFileDialog::hide方法代码示例

本文整理汇总了C++中QFileDialog::hide方法的典型用法代码示例。如果您正苦于以下问题:C++ QFileDialog::hide方法的具体用法?C++ QFileDialog::hide怎么用?C++ QFileDialog::hide使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QFileDialog的用法示例。


在下文中一共展示了QFileDialog::hide方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: saveFileToDevice

void CFileBrowser::saveFileToDevice(void){
    //Copy file to the device
    QFileDialog fileDialog;
    connect(&fileDialog,
            SIGNAL(filesSelected(QStringList)),
            this,
            SLOT(saveFileToDeviceSelected(QStringList)), Qt::QueuedConnection);
    fileDialog.setFileMode(QFileDialog::ExistingFiles);
    fileDialog.exec();
    fileDialog.hide();
}
开发者ID:CoActionOS,项目名称:CoActionOS-Desktop,代码行数:11,代码来源:CFileBrowser.cpp

示例2: OpenFileShader

void MainWindow::OpenFileShader(void){
    QFileDialog     *fd;
    QString         filter;

      fd = new QFileDialog();
      fd->setDirectory(sampleDir);
      FileName = fd->getOpenFileName(this,tr("Open Shader Files"),sampleDir,"Shader Files ( *.vert | *.frag)", &filter);
      fd->hide();

      if (!FileName.isEmpty()){
        glwidget->setShaderFile(FileName);
        glwidget->loadShader();
      }
}
开发者ID:njrizzo,项目名称:tucano,代码行数:14,代码来源:mainwindow.cpp

示例3: QLabel

// CWFSecondPage
CWSecondPage::CWSecondPage(QWidget *parent) : DWizardPage(tr("Configure KToon"), parent)
{
    setPixmap( QPixmap(wizard2_xpm) );

    DVHBox *container = new DVHBox(0, Qt::Vertical);
    container->boxLayout()->setAlignment(Qt::AlignTop);

    new QLabel(tr("<h3>Step 1<h3>"), container);

    new QLabel(tr("Choose your KToon installation directory"), container);

    DVHBox *hbox1 = new DVHBox(container, Qt::Horizontal);

    m_kthome = new QLineEdit(QString::fromLocal8Bit(::getenv("KTOON_HOME")), hbox1);

    connect(m_kthome, SIGNAL(textChanged(const QString &)), this, SLOT(verify(const QString &)));

    m_kthome->setToolTip(tr("Choose the directory where KToon is installed"));

    QPushButton *button = new QPushButton(tr("Browse..."), hbox1);

    QFileDialog *fd = new QFileDialog(hbox1);
    connect(fd, SIGNAL(currentChanged ( const QString & )), m_kthome, SLOT(setText(const QString &)));
    fd->setFileMode(QFileDialog::Directory);
    fd->setModal(true);
    fd->hide();
    connect(button, SIGNAL(clicked()), fd, SLOT(show()));

    new QLabel(tr("Choose a temporal directory"), container);

    DVHBox *hbox2 = new DVHBox(container, Qt::Horizontal);

    m_ktrepos = new QLineEdit(QDir::tempPath(),hbox2);

    connect(m_ktrepos, SIGNAL(textChanged(const QString &)), this, SLOT(verify(const QString &)));

    m_ktrepos->setToolTip(tr("Choose the directory for temporal files"));

    QFileDialog *fd2 = new QFileDialog(hbox2);
    connect(fd2, SIGNAL(currentChanged ( const QString & )), m_ktrepos, SLOT(setText(const QString &)));

    fd2->hide();
    fd2->setFileMode(QFileDialog::Directory);
    fd2->setModal(true);
    QPushButton *button2 = new QPushButton(tr("Browse..."), hbox2);

    connect(button2, SIGNAL(clicked()), fd2, SLOT(show()));

    setWidget(container);
}
开发者ID:BackupTheBerlios,项目名称:ktoon-svn,代码行数:51,代码来源:configwizard.cpp

示例4: on_LoadAnimBTN_clicked

/**
 * @brief  Loads a LED-Matrix animation from a .txt File and show it on the LED-Matrix
 *
 */
void MainWindow::on_LoadAnimBTN_clicked()
{
    if(m_ui->AnimSequence->text().isEmpty() == true)
    {
        QMessageBox::critical(this, "Error", "Please enter the sequence of the animation!", QMessageBox::Ok);
        return;
    }
    else
    {
        QFileDialog dia; // = QFileDialog::getOpenFileName(this, tr("Open file"), "/home/pi/LEDMatrix/", tr("Text Files (*.txt)"));
        QString fileName = dia.getOpenFileName(this, tr("Open file"), "/home/pi/LEDMatrix/", tr("Text Files (*.txt)"));
        dia.hide();

        ifstream file;
        file.open(fileName.toStdString(), ios_base::in);

        char c;
        string line;
        unsigned char* cArray = new unsigned char[64];



        while(getline(file, line))
        {
            int count = 0;
            for (int i = 0; i < line.length(); i++)
            {
                c = line[i];
                if(c != ' ')
                {

                    cArray[count] = static_cast<unsigned char>(c);
                    count++;
                }
            }
            Update(cArray);
            sleep_for(seconds(m_ui->AnimSequence->text().toInt()));
        }

        file.close();
    }
}
开发者ID:Obbilix,项目名称:Raspberry-Pi,代码行数:46,代码来源:mainwindow.cpp


注:本文中的QFileDialog::hide方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。