Results 1 to 7 of 7

Thread: Problems with signals and slots [probably c++ issue]

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2012
    Posts
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Problems with signals and slots [probably c++ issue]

    Hi guys, I am making and app to allow users to make some simple network diagrams. The app will allow users to draw simple lines and drag and drop devices.
    I have reimplemented the following classes: myScene, myView, myCable, myLine and myRouter. I notice that I mostly instantiate my other objects in myScene and the GUI interacts mostly with myScene. I was wondering if I am doing it wrong without having any inheritance as I frequently encounter situation where I need to connect signal and slot from my other classes to the mainwindow. It got me thinking if my other classes should inherits from myScene class.

    E.g. I reimplemented the mouseDoubleClicked() in myCable which is a subclass of QGraphicsLineItem, I wanted it to emit a signal to update a QTreeWidget but I it has not been instantiated and I could not do it. I only instantiate it in myScene class.

    Thank you all in advance for any advices.

    P.S. I apologise in advance if the question is too simple, I am new to C++ and also QT Programming.
    Last edited by Nayrb; 26th April 2012 at 06:33.

Similar Threads

  1. Problems with signals and slots
    By zzz9 in forum Qt Programming
    Replies: 3
    Last Post: 26th September 2011, 08:52
  2. Signals and Slots
    By Maluko_Da_Tola in forum Newbie
    Replies: 3
    Last Post: 29th July 2010, 23:57
  3. Signals and Slots
    By 83.manish in forum Qt Programming
    Replies: 3
    Last Post: 30th June 2008, 10:31
  4. regarding signals/slots
    By jjbabu in forum Qt Programming
    Replies: 2
    Last Post: 4th October 2007, 09:32
  5. Signals and Slots
    By merry in forum Qt Programming
    Replies: 4
    Last Post: 22nd February 2007, 08:11

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
  •  
Qt is a trademark of The Qt Company.