Results 1 to 2 of 2

Thread: mainwindow

  1. #1
    Join Date
    Aug 2012
    Posts
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default mainwindow

    i have created a new mainwindow in qt designer. i have also set an action for all the buttons. i am not able to link the individual buttons for there specific use. for e.g. how should i open a saved file when i press open button in my created mainwindow....
    please help asap.
    THANK YOU in advance.

  2. #2
    Join Date
    Oct 2011
    Location
    Germany
    Posts
    27
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: mainwindow

    You should read about signals and slots.

    Qt Code:
    1. connect(myButton, SIGNAL(clicked()), this, SLOT(doSomething());
    To copy to clipboard, switch view to plain text mode 

    or
    Qt Code:
    1. connect(myAction, SIGNAL(triggered()), this, SLOT(doSomething());
    To copy to clipboard, switch view to plain text mode 
    Insanity: doing the same thing over and over again and expecting different results.
    Albert Einstein

Similar Threads

  1. Replies: 0
    Last Post: 6th November 2011, 09:22
  2. Replies: 1
    Last Post: 12th April 2011, 09:53
  3. Replies: 1
    Last Post: 6th July 2010, 12:03
  4. mainwindow modality
    By user in forum Qt Programming
    Replies: 0
    Last Post: 11th July 2008, 00:54
  5. MainWindow
    By amagdy.ibrahim in forum Newbie
    Replies: 6
    Last Post: 14th June 2008, 14:12

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.