|
|
![]() |
| Thread Tools | Search this Thread |
#1
| |||
| |||
Initialize a progress bar in C++ I want to make a button and a bar pogression, when I click on the button bar or initialize a new bar it returns to 0%.Here is my code, but "the program crashes " Code: m_initialiser = new QPushButton ( "Initialize", this); m_initialiser -> move (600, 550); QObject:: connect (m_initialiser, SIGNAL (clicked ()), m_progressbar, SLOT (reset ())); |
#2
| |||
| |||
Re: Initialize a progress bar in C++ The program crashes on execution or compilation? And what is the error report? (if it crashes to the compilation). |
#3
| |||
| |||
Re: Initialize a progress bar in C++ it was the problem in order to call the function : Code: class Example: public QWidget ( Q_OBJECT QPushButton * bt_m; QVector <QLineEdit *> le_m; public: Example () ( bt_m = new QPushButton ( "Click", this); le_m. push_back (new QLineEdit (this)); connect (le_m. back (), SIGNAL (triggered ()), this, SLOT (doSomething ())); le_m. push_back (new QLineEdit (this)); connect (le_m. back (), SIGNAL (triggered ()), this, SLOT (doSomething ())); ) private slots: void doSomething () ( le_m [0] -> setText ( "hi"); le_m [1] -> setText ( "hello"); ) ); |
#4
| |||
| |||
Re: Initialize a progress bar in C++ I was wrong if you connect m_progressbarre even before creation? It's where I think the object sender and receiver must exist before the execution of connect (.....); |
![]() |
|
Tags: button, c program, progress bar |
Thread Tools | Search this Thread |
|
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to reset Co-Op progress in Portal 2? | Delightful. | Video Games | 7 | 29-04-2011 01:17 PM |
I cannot see the progress bar in the Status Bar | Allinone | Technology & Internet | 3 | 27-02-2011 06:05 AM |
Windows 7 is now progress or not | SajalSOFT | Operating Systems | 4 | 09-12-2010 07:29 AM |
PHP CLI progress bar | Bambina | Software Development | 2 | 26-08-2009 11:49 PM |
Animated GIF Progress Bar | Nawvin | Software Development | 3 | 16-07-2009 09:11 AM |