Skip to content

Qt in Education

Are you a student or a teacher using Qt Educational Licenses? Here you can discuss about the educational use of Qt, share your learning projects, and network with others.

256 Topics 1.2k Posts
  • Qt Elearning

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Qt load 3Dmodel

    4
    0 Votes
    4 Posts
    3k Views
    X
    Hello,utcenter. I am reading the Qt3D Troubleshooting. In the last part, it suggests that I should delete the values in Windows registry @HKEY_CURRENT_USER\Software\Trolltech\OrganizationDefaults\Qt Plugin Cache 4.2.debug HKEY_CURRENT_USER\Software\Trolltech\OrganizationDefaults\Qt Plugin Cache 4.2.false@ But in my computer,the values read this: @Qt Plugin Cache 4.5.false Qt Plugin Cache 4.6.false Qt Plugin Cache 4.7.debug Qt Plugin Cache 4.7.false Qt Plugin Cache 4.8.debug Qt Plugin Cache 4.8.false @ Should I delete them all?
  • Qt video tutorials on YouTube

    60
    1 Votes
    60 Posts
    62k Views
    V
    ThanQ very much you done a great job,it helps to Qt beginers
  • Some suggestions

    10
    0 Votes
    10 Posts
    5k Views
    A
    It is sometimes enlightening to open and read the generated code. In this case, take a look inside the generated ui.h file. The moc.cpp files are also interesting, but a bit harder to understand.
  • Video tutorials for QML Symbian and MeeGo

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • I've written at least 3 "simple" Qt apps I can email

    10
    0 Votes
    10 Posts
    6k Views
    C
    here they are: "Your text to link here...":https://sourceforge.net/projects/qtexamples/files/ sourceforge is unnecessarily complex...grandiose all 3 examples work but require a gunzip, tar xvf and execution (readme.txt file in each project ) sourceforge gurus advise..please The Lottery example will be changed to allow personal selection of 6 external values to run against 6 generated values
  • Lookup Table without a view

    3
    0 Votes
    3 Posts
    3k Views
    M
    You could use a QListWidget to display items stored in a QStringList.
  • Qt OpenGL gltexture

    4
    0 Votes
    4 Posts
    7k Views
    X
    Attention:you must add glu.h or glut.h manually in you QtOpenGL file I think one must understand though only core code related to texture is showed. @#include <QtGui> #include <QtOpenGL> #include <glut.h> void GLwidget::loadTextures() { glEnable(GL_TEXTURE_2D); QImage text[3],buff[3]; if(!buff[0].load("./sun.bmp") ||!buff[1].load("./earth.bmp") ||!buff[2].load("./moon.bmp")){ printf("Load Image failed!\n"); } text[0] = QGLWidget::convertToGLFormat(buff[0]); text[1] = QGLWidget::convertToGLFormat(buff[1]); text[2] = QGLWidget::convertToGLFormat(buff[2]); glGenTextures(3,&texture[0]); glBindTexture( GL_TEXTURE_2D, texture[0] ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR ); glTexImage2D( GL_TEXTURE_2D, 0, 3, text[0].width(), text[0].height(), 0, GL_RGBA, GL_UNSIGNED_BYTE, text[0].bits() ); glBindTexture( GL_TEXTURE_2D, texture[1] ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR ); glTexImage2D( GL_TEXTURE_2D, 0, 3, text[1].width(), text[1].height(), 0, GL_RGBA, GL_UNSIGNED_BYTE, text[1].bits() ); glBindTexture( GL_TEXTURE_2D, texture[2] ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR ); glTexImage2D( GL_TEXTURE_2D, 0, 3, text[2].width(), text[2].height(), 0, GL_RGBA, GL_UNSIGNED_BYTE, text[2].bits() ); }@ @ void GLwidget::paintGL() {GLUquadricObj *quadratic = gluNewQuadric(); glBindTexture(GL_TEXTURE_2D, texture[0]); //the same with texture[1],[2] glPushMatrix(); gluSphere(quadratic,sunRadius,100,100); glPopMatrix(); }@ @ void GLwidget::initializeGL(){ glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); }@
  • Qt3D errors

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Qt import 3Dmodels

    6
    0 Votes
    6 Posts
    4k Views
    X
    Qt5.0 alpha can not run on windows. How to deal with it ?
  • QtLogo

    4
    0 Votes
    4 Posts
    4k Views
    X
    @void GLWidget::mouseMoveEvent(QMouseEvent *event) { int dx = event->x() - lastPos.x(); int dy = event->y() - lastPos.y(); if (event->buttons() & Qt::LeftButton) { setXRotation(xRot + 8 * dy); setYRotation(yRot + 8 * dx); } else if (event->buttons() & Qt::RightButton) { setXRotation(xRot + 8 * dy); setZRotation(zRot + 8 * dx); } lastPos = event->pos(); } @ I delete the event->button() in mouseMoveEvent(), and it works. And I find that "event->buttons() & Qt::LeftButton " equals to "Qt::LeftArrow". Is it right? Edit: please wrap code sections in @ tags; Andre
  • SetData(int role,const QVariant) Data(int role)

    3
    0 Votes
    3 Posts
    3k Views
    A
    Well, all is contained in the [[doc:QModelIndex]]. It contains row, column and parent item. These three together uniquely identify an item in an model. Edit: I happen to have the book here, but I can't quickly locate the exact snippet you're talking about.
  • [Solved] Qt Programming in VS2008

    5
    0 Votes
    5 Posts
    3k Views
    K
    No problem. Glad to hear that your problem has been solved. Sometimes we overlook some simple things over and over again. Please mark your thread as solved next time.
  • Find QScrollArea viewport location relative to embedded widget

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Need help... confused a bit with Qt Creator

    2
    0 Votes
    2 Posts
    4k Views
    K
    Qt creator is an IDE (Integrated Development Environment) which helps you developing your applications. The sections, you are showing, are C++ source code presumably generated by the Qt creator based it templates. Q_OBJECT is required for the "Meta Object Compiler ":http://developer.qt.nokia.com/doc/qt-4.8/moc.html The "explicit statement is explained here":http://www.glenmccl.com/tip_023.htm for example. All see there is basic C++ code. It is recommended to have sufficient knowledge of C++ for using it with Qt. You might want to look for a C++ tutorial first, if you are lacking this knowledge. "One option for a tutorial.":http://www.cplusplus.com/doc/tutorial/ Please consult google search for others.
  • Programming with Qt Quick for Symbian and MeeGo Harmattan Devices

    11
    0 Votes
    11 Posts
    7k Views
    G
    I dont know how exactly works the database naming on QML, i created a empty database, took his name and download a file with that name and put it into storage directory.
  • Labs for QT in Education

    3
    0 Votes
    3 Posts
    4k Views
    W
    Hi, qBound() for QSize is not defined because it is not easily determined whether (20,10) is larger than (10, 20). You need to do the comparison dimension by dimension like that: @void PuzzleSizeWidget::setValue(const QSize &s) { // ... QSize newSize; newSize.setWidth(qBound(minimum().width(), s.width(), maximum().width()); newSize.setHeight(qBound(minimum().height(), s.width(), maximum().height()); // ... }@ or make use of QSize::boundedTo() and QSize::expandedTo(): @void PuzzleSizeWidget::setValue(const QSize &s) { // ... QSize newSize = s.expandedTo(minimum()).boundedTo(maximum()); // ... }@ Of course you could also just define qBound() for QSize: @QSize qBound(const QSize& min, const QSize& curr, const QSize& max) { return curr.boundedTo(max).expandedTo(min); }@ Hope that helps, good luck with your lab :)
  • QML Javascript Databse Process

    3
    0 Votes
    3 Posts
    5k Views
    J
    Ok, this would work for now but if you find a better method please share :) this is my WorkerScript JS file "dbprocessor.js" @ var init = function(ids, overview) { // QML is ready var db = openDatabaseSync("QDeclarativeExampleDB", "1.0", "The Example QML SQL!", 1000000); db.transaction( function(tx) { // Create the database if it doesn't already exist tx.executeSql('CREATE TABLE IF NOT EXISTS Greeting(salutation TEXT, salutee TEXT)'); // Add (another) greeting row tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ ids, overview ]); } ) } WorkerScript.onMessage = function(message) { // ... long-running operations and calculations are done here switch(message.msg) { case"init": WorkerScript.sendMessage({ 'reply': 'Done init'}); init(message.ids, message.overview); break; } @ And my main.qml file @import Qt 4.7 Rectangle { property bool done: false id: top width: 400 height: 400 property XmlListModel list: XmlListModel { id: xmlModel source: "http://www.example.com/data.xml" query: "/feed/xml/" XmlRole { name: "ids"; query: "id/string()" } XmlRole { name: "overview"; query: "description/string()" } } WorkerScript { id: werk source: "dbprocessor.js" onMessage: console.log(messageObject.reply) } Component { id: delegate Text { // or whatever item MouseArea { // Item click handler anchors.fill: parent onClicked: { console.log("clicked"); } // implement the click handler in the JavaScript } //Just to view data inserted text: ids Component.onCompleted:{ if(!done) { for(var i=0; i&lt; xmlModel.count; i++) werk.sendMessage({'msg': "init", 'ids': xmlModel.get(i).ids, 'overview': xmlModel.get(i).overview }); done = true; } } } } ListView { anchors.fill: parent model: top.list; delegate: delegate; } } @
  • Any Qt Quick and QML related book in the works?

    6
    0 Votes
    6 Posts
    10k Views
    T
    Qt Quick is relatively new and undergoing many changes. Writing a book at this point in time may invalidate it very fast. I guess there would be books written, but may be after stabilization of the features.
  • Learning Qt & QML : What path to follow?

    13
    0 Votes
    13 Posts
    14k Views
    E
    This is the online resource for Qt Quick : http://developer.qt.nokia.com/doc/qt-4.7/qtquick.html