Results 1 to 2 of 2

Thread: don`t work Condition...

  1. #1
    Join Date
    May 2011
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question don`t work Condition...

    its work:
    Qt Code:
    1. if (QTabWidget *tabwidget = qobject_cast<QTabWidget*>(childrens[i])) { ... }
    To copy to clipboard, switch view to plain text mode 

    its don`t work
    Qt Code:
    1. if (((QTabWidget *tabwidget = qobject_cast<QTabWidget*>(childrens[i])) && (!allwidgetslist)) || (allwidgetslist)) {...}
    To copy to clipboard, switch view to plain text mode 

    Why? Please help :`(

    ...sory work, but if initialize tabwidget before Condition...
    Qt Code:
    1. QTabWidget *tabwidget;
    2. if (((tabwidget = qobject_cast<QTabWidget*>(childrens[i])) && (!allwidgetslist)) || (allwidgetslist))
    To copy to clipboard, switch view to plain text mode 
    Last edited by Resager; 6th May 2011 at 18:13.

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: don`t work Condition...

    So which part of the condition fails? Use a debugger and you'll find out

Similar Threads

  1. Using an If condition in a QML delegate?
    By technoViking in forum Qt Quick
    Replies: 8
    Last Post: 25th August 2011, 06:26
  2. QFileDialog custom acceptance condition
    By akos.maroy in forum Qt Programming
    Replies: 3
    Last Post: 4th April 2011, 13:35
  3. How can i terminate a delay / wait condition
    By asinghma in forum Qt Programming
    Replies: 1
    Last Post: 22nd February 2011, 15:41
  4. Replies: 2
    Last Post: 30th June 2010, 11:48
  5. Sleep condition in QT
    By santhoshv84 in forum Qt Programming
    Replies: 1
    Last Post: 18th July 2008, 13:07

Tags for this Thread

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.