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. Problem with filedialog for opengl application.
Forum Updated to NodeBB v4.3 + New Features

Problem with filedialog for opengl application.

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 547 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.
  • Q Offline
    Q Offline
    Q139
    wrote on last edited by
    #1

    Hello,
    Having problem with crash while calling file opening dialog or window gui / interface from seperate class.
    Also crash if window->show comand used to show seperate gui.

    @ if (m->button() == Qt::MidButton){
    allowmousemove = 1;
    VALUElast = move_LEFT_RIGHT;
    VALUElastUP_DOWN = move_UP_DOWN;
    start_mouse_move = m->globalX()- VALUElast;
    start_mouse_move2 = m->globalY()- VALUElastUP_DOWN;
    }

    }

    void OpenGLWindow::mouseReleaseEvent(QMouseEvent *w)
    {
    if (w->button() == Qt::MidButton){
    allowmousemove = 0;
    }
    }

    void OpenGLWindow::mouseMoveEvent(QMouseEvent *q)
    {
    if(allowmousemove==1){

    offsetMouseX = (q->globalX()-start_mouse_move);
    offsetMouseY = (q->globalY()-start_mouse_move2);
    

    }
    }

    void OpenGLWindow::keyPressEvent(QKeyEvent *e){

    if(e->key() == Qt::Key_F1){

    CRASHLINE-> // FileTOopen = QFileDialog::getOpenFileName(); // vali fail
    FileTOopen = "C:/WWW/out.txt";

       readfile();         //loe sisse fail
                          }
    
    
    if(e->key() == Qt::Key_F11){     zoom++;                 }
    if(e->key() == Qt::Key_F12){        zoom--;               }
    
    if(e->key() == Qt::Key_F6){                      }
    

    }

    OpenGLWindow::~OpenGLWindow()
    {
    delete m_device;
    }
    //! [2]
    void OpenGLWindow::render(QPainter *painter)
    @

    That line // evokes crash, what to do different or proper to avoid this problem , app is rendering opengl while calling, minigw compiler.

    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