QKinecticScroller
Hi all,
I followed exactly as explained in this link
http://qt-project.org/forums/viewthread/4059
Used the same qskinecticscroller.h and .cpp files but still my code is working not I am not able to scroll it……Is there any changes I have to make in the qskinecticscroller files?
here is my .h file
- #ifndef CURRENT_H
- #define CURRENT_H
- #include <QtGui>
- #include <QWidget>
- namespace DMM {
- class DMMMenu;
- }
- namespace DMM {
- namespace Ui {
- class Current;
- }
- {
- Q_OBJECT
- public :
- ~Current();
- public slots:
- void On_homeButton_clicked();
- public:
- DMM::DMMMenu *current_home;
- DMM::Current *current;
- private:
- DMM::Ui::Current *ui;
- };
- }
- #endif // CURRENT_H
here is the.cpp file:
- #include "../../DMM/Include/Current.h"
- #include "../../DMM/Include/Scroll.h"
- #include "ui_Current.h"
- #include <QDateTime>
- #include <QComboBox>
- #include <QScrollArea>
- #include <QScrollBar>
- namespace DMM {
- ui(new Ui::Current)
- {
- ui->setupUi(this);
- Scroll *scroller = new Scroll(this);
- scroller->enableKineticScrollFor(ui->scrollArea);
- connect(ui->homeButton, SIGNAL(clicked()), this, SLOT(On_homeButton_clicked()));
- // // get current date
- // QDate date = QDate::currentDate();
- // QString dateString = date.toString();
- // ui->label_date->setText(dateString);
- // // get current time
- // QTime time = QTime::currentTime();
- // QString timeString = time.toString();
- // ui->label_time->setText(timeString);
- // CurrentRatio
- ui->comboBox->addItem("1:1");
- ui->comboBox->addItem("1:10");
- ui->comboBox->addItem("1:100");
- ui->comboBox->addItem("1:1000");
- }
- void Current::On_homeButton_clicked()
- {
- current_home->show();
- this->close();
- }
- Current::~Current()
- {
- }
You can find the kinecticscrollers.h and .cpp files in the described link…I am not able to paste here as it was too long….
But there is no changes made in these two files.
Please Help!!!
Thanks,
Pragati
1 reply
Please see this post.
You must log in to post a reply. Not a member yet? Register here!


