Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QKinecticScroller

QKinecticScroller

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pragati
    wrote on last edited by
    #1

    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;

    }

    class Current: public QWidget

    {
    Q_OBJECT

    public :

    Current(QWidget *parent = 0);
    ~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 {

    Current::Current(QWidget *parent) :
    QWidget(parent),

    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 Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      Please see "this":/forums/viewthread/18122/ post.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved