今天开始学习QT for sysbiam 1

    因为自己的诺基亚E6软件更新太不给力了,自己研究一下。主要使用QT,使用塞班的C++,也太难为我了,好了今天,新建按照顺序下去就成了。

做了一滑块的比例尺

代码如下:

#include <QtGui/QApplication>
#include "qmlapplicationviewer.h"
#include <QVBoxLayout>
#include <QSpinBox>
#include <QSlider>
#include <QPushButton>


Q_DECL_EXPORT int main(int argc, char *argv[])
{
    /* QScopedPointer<QApplication> app(createApplication(argc, argv));

    QmlApplicationViewer viewer;
    viewer.setMainQmlFile(QLatin1String("qml/untitled/main.qml"));
    viewer.showExpanded();   */
    QApplication app(argc,argv);
    QWidget window;

    QVBoxLayout* layout = new QVBoxLayout(&window);

    QSpinBox* spinBox = new QSpinBox;
    QSlider* slider = new QSlider(Qt::Horizontal);
    QPushButton* exitButton = new QPushButton("EXit");

    layout->addWidget(spinBox);
    layout->addWidget(slider);
    layout->addWidget(exitButton);

    window.show();


    return app.exec();
}

去掉的部分含有QML的元素,这个现在没能掌控,换个普通的试试
原文地址:https://www.cnblogs.com/will-boot/p/5218737.html