Results 1 to 15 of 15

Thread: QCheckBox example?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Wiki edits
    17

    Default Re: QCheckBox example?

    You already have the code. Connect the signal from whatever widget the user uses to actually attempt to start the program to a slot containing the code from your first post. You do not need to connect the checkbox to anything unless you want the program to launch every time the checkbox is clicked.

    Qt Code:
    1. // slot
    2. void goForthAndExecute()
    3. {
    4. // QProcess commandProcess;
    5.  
    6. if (ui->check2pass->isChecked()){
    7. args << "-pass"; args << "2";
    8. }
    9. commandProcess.start("C:/ffmpeg.exe",args);
    10. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by ChrisW67; 9th December 2010 at 06:17.

Similar Threads

  1. About QCheckBox
    By liushuo0826 in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 16th April 2010, 07:14
  2. QCheckBox in QTreeWidget
    By Kode.Cooper in forum Qt Programming
    Replies: 3
    Last Post: 25th March 2010, 06:55
  3. QCheckBox value
    By Koas in forum Qt Programming
    Replies: 2
    Last Post: 19th January 2009, 14:33
  4. Read-only QCheckBox
    By alu23 in forum Qt Programming
    Replies: 2
    Last Post: 22nd April 2008, 17:25
  5. QCheckbox
    By sonuani in forum Qt Programming
    Replies: 1
    Last Post: 19th February 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
  •  
Qt is a trademark of The Qt Company.