Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Can't run on other computer
Forum Updated to NodeBB v4.3 + New Features

Can't run on other computer

Scheduled Pinned Locked Moved Installation and Deployment
3 Posts 2 Posters 2.3k Views 1 Watching
  • 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.
  • S Offline
    S Offline
    shadowfox
    wrote on last edited by
    #1

    well i write a program with QtSDK 1.1.9 on windows 7 for desktop, using standard qt libs(like qapplication...) and qopengl lib. now i want deploy it finding no file in folder "release", while i get files in folder "debug" and copied some dll into it. finally it can run normally (without compiler) on my computer. but i copied the folder to my friend's computer(windows 7 also) ,it can run the qtgui parts normally, but when it comes to the part using opengl it doesn't show the right things.
    how can i solve this problem? i want it to be able to run at any desktop( firstly windows 7 & xp).

    1 Reply Last reply
    0
    • Q Offline
      Q Offline
      qxoz
      wrote on last edited by
      #2

      You must build your project in release mode, then you can get files from release folder.
      About OpenGL, what exactly show wrong?

      1 Reply Last reply
      0
      • S Offline
        S Offline
        shadowfox
        wrote on last edited by
        #3

        [quote author="qxoz" date="1322496723"]You must build your project in release mode, then you can get files from release folder.
        About OpenGL, what exactly show wrong? [/quote]

        i tried the release mode. the release file can't even run normally on my computer (it have the same problem as it on my friends computer).

        this is my code. well if you don't want to read it ,i explanin it here. i first draw three line for axix x y and z, and than draw some dots there. but i can only see the lines but no dots. i update the gl after i draw all the dots.

        @#include "visualazition.h"
        #include <QtOpenGL/QGLWidget>
        #include <iostream>
        using namespace std;

        extern int N,m;
        int j=1;
        float ro=0;

        float getdata(int ste, int num, int xyz);

        visualazition::visualazition(QWidget *parent,
        const QGLWidget *shareWidge,Qt::WindowFlags f){
        setMinimumSize(320,240);
        resize(640,480);
        setWindowTitle(tr("GROUP"));
        startTimer(5);
        }

        void visualazition::initializeGL()
        {
        glShadeModel(GL_SMOOTH);
        glClearColor(1.0,1.0,1.0,0.0);
        glClearDepth(1.0);
        glEnable(GL_DEPTH_TEST);
        glDepthFunc(GL_LEQUAL);
        glHint(GL_PERSPECTIVE_CORRECTION_HINT,GL_NICEST);
        }

        void visualazition::paintGL(){
        float sro=20.0/m;

        glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
        glLoadIdentity();
        glTranslatef(-1.5,-1.5,-8);
        glRotatef(-90,1.0,0.0,0.0);
        glRotatef(30+ro,0.0,0.0,1.0);
        
        glColor3f(1.0,0.0,0.0);
                glBegin(GL_LINE_STRIP);
                        glVertex3f(-2.0,0.0,0.0);
                        glVertex3f(4.0,0.0,0.0);
                glEnd();
        glColor3f(0.0,1.0,0.0);
                glBegin(GL_LINE_STRIP);
                        glVertex3f(0.0,-4.0,0.0);
                        glVertex3f(0.0,4.0,0.0);
                glEnd();
        glColor3f(0.0,0.0,1.0);
                glBegin(GL_LINE_STRIP);
                        glVertex3f(0.0,0.0,0.0);
                        glVertex3f(0.0,0.0,4.0);
                glEnd();
        
                glColor3f(0.0,0.0,0.0);
                glPointSize(5);
                glBegin(GL_POINTS);
                        for (int i=1;i<=N;i++){
                                glVertex3f(getdata(j,i,1)/5.0,getdata(j,i,2)/5.0,getdata(j,i,3)/5.0);
                        }
                glEnd();
                j++;ro+=sro;
        

        }

        void visualazition::resizeGL(int width, int height){
        glViewport(0,0,width,height);
        glMatrixMode(GL_PROJECTION);
        glLoadIdentity();
        gluPerspective(45.0,width/height,0.1,100.0);
        glMatrixMode(GL_MODELVIEW);
        glLoadIdentity();
        }

        void visualazition::timerEvent( QTimerEvent * ){
        if (j<=m)
        updateGL();
        }@

        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