Results 1 to 3 of 3

Thread: Signal to Progressbar in Mainwindows Statusbar

  1. #1
    Join Date
    Feb 2016
    Posts
    21
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Signal to Progressbar in Mainwindows Statusbar

    Hi

    Again a question

    How can i send a SIGNAL to a SLOT in Mainwindow from any SUBCLASS?

    Example

    I Have a Statusbar with an Progressbar in MainWindow
    A SLOT handle the Update of values for the Progressbar

    Now i run a CLASS class1 from Mainwindow which use inside class2.
    How send class2 the SIGNAL to the MAINWINDOW? Must i send this SIGNAL to class1 which send it to mainwindow or can class2 send it direct?


    lg Chris

  2. #2
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Signal to Progressbar in Mainwindows Statusbar

    You can connect signal from class2 to slot in mainwindow in class1.

  3. #3
    Join Date
    Mar 2014
    Posts
    23
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows Android

    Default Re: Signal to Progressbar in Mainwindows Statusbar

    Just to make sure. You don't want to notify the MainWindow but rather the receiver itself.
    So usually you don't put any instance inbetween sending and receiving entities. As Lesiok said just connect their signals and slots directly and make sure their parameters match.

Similar Threads

  1. Replies: 2
    Last Post: 10th July 2013, 15:30
  2. MainWindows
    By Maluko_Da_Tola in forum Newbie
    Replies: 2
    Last Post: 25th August 2010, 07:08
  3. multiple mainwindows
    By JeanC in forum Qt Programming
    Replies: 4
    Last Post: 4th February 2008, 19:22
  4. Replies: 2
    Last Post: 7th January 2007, 22:07
  5. Proper way of using Designer for MainWindows
    By Doug Broadwell in forum Newbie
    Replies: 1
    Last Post: 11th October 2006, 08:20

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.