Results 1 to 2 of 2

Thread: Interaction between QMenuBar and QGLWidget

  1. #1
    Join Date
    Mar 2011
    Posts
    34
    Qt products
    Qt4
    Platforms
    Windows

    Default Interaction between QMenuBar and QGLWidget

    Hi,

    I wish to create an option in the menu bar of my Qt application which can load an ASCII file with vertex. This file will be used to paint the object on a qglwidget.

    Unfortuneadly I don't know how to do this:

    I have my MenuBar on my MainWindow which is a QWidget. All actions are for the menu are implemented. I call the .ui form in the creator function:
    Qt Code:
    1. MenuPrincipal::MenuPrincipal(QWidget *parent) :
    2. QWidget(parent),
    3. ui(new Ui::MenuPrincipal)
    4. {
    5. ui->setupUi(this);
    6. setCurrentFile("");
    7. textEdit = new QTextEdit;
    8. createActions();
    9. }
    To copy to clipboard, switch view to plain text mode 

    Calling the .ui I can see the QGLWidget. But now, how to sent signals from "MenuPrincipal" to glwidget, the class of my QGLWidget?

    Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Interaction between QMenuBar and QGLWidget

    how to sent signals from "MenuPrincipal" to glwidget,
    Do you know how signal and lots are used?
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. QML and C++ interaction
    By cueMan in forum Qt Programming
    Replies: 3
    Last Post: 11th November 2010, 07:30
  2. QProcess and Interaction Between 2 QT Apps
    By sam_1802 in forum Qt Programming
    Replies: 1
    Last Post: 24th August 2010, 10:08
  3. UI Interaction gone!
    By zgulser in forum Qt Programming
    Replies: 3
    Last Post: 15th May 2010, 12:08
  4. Qt interaction with X11
    By qwakaw in forum Qt Programming
    Replies: 1
    Last Post: 28th December 2008, 20:17
  5. QGraphicsTextItem bug on mouse interaction?
    By mooreaa in forum Qt Programming
    Replies: 3
    Last Post: 4th July 2008, 07:29

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.