1

I'm reading Qt Documentation, Specifying Build Settings section. Under the 'Using Qt Creator Variables' I found following sentence.

Select the (Variables) button in a field to select from a list of variables that are available in a particular context.

But I found no Variables button in Qt Creator 3.3.0. Just found the same question asked in a forum.

Can anybody explain me what it is or where I can find the button?

Claudio
  • 10,614
  • 4
  • 31
  • 71
Hareen Laks
  • 1,432
  • 2
  • 17
  • 33
  • 1
    No only you struggling with that: http://stackoverflow.com/questions/34271859/what-are-qtcreator-build-step-variable-names-such-as-builddir – Alexander V Dec 15 '15 at 20:03

2 Answers2

0

You can use SIGNAL AND SLOT

Drop in form some button,
cpp file.

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    connect(ui->button1,SIGNAL(clicked),this,SLOT(someRecivedFunc));
}

MainWindow::~MainWindow()
{
    delete ui;
    conn.close();
}

void MainWindow::someRecivedFunc(){

}

h file

#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include  "QMainWindow" </pre>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private slots:
    void someRecivedFunc();

private:
    Ui::MainWindow *ui;
};


#endif // MAINWINDOW_H
Parviz Rozikov
  • 259
  • 2
  • 10
  • Thank you for your answer. But I think you misunderstood the question. I asked about a button mentioned in the Qt Documentation. It says there is a button in Qt Creator to view all available variables in a particular context. But I couldn't find it. – Hareen Laks Dec 18 '15 at 05:56
0

I think some fields can have a select variable button, and some don't. For example, in "Left Panel -> Projects -> Run Settings" both Run: argument field and Run:working directory field can use the select variable buttons to the right side of the fields.

Robin Hsu
  • 4,164
  • 3
  • 20
  • 37
  • Thank you for your answer. But I cannot found anything in the places you mentioned here. I'm using Qt creator 3.6.1 now. – Hareen Laks May 05 '16 at 03:11
  • Interesting. I am use old version Qt Creator 3.4.2, which has the feature (partly, not all fields can have variable buttons). – Robin Hsu May 13 '16 at 04:07