Results 1 to 2 of 2

Thread: Qt3.3 QApplication mainWidget equivalent in Qt4.2

  1. #1
    Join Date
    Jun 2006
    Location
    San Diego, USA
    Posts
    95
    Thanks
    9
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Qt3.3 QApplication mainWidget equivalent in Qt4.2

    Hi All,

    I have an application which was developed under Qt3.3 version. I need to add few more additions to it and need to use Qt4.2version. So in Qt3.3 app it has postevent for an application saying "QApplication:ostEvent(qApp->mainWidget(), new function()"

    So it doesn't compile in Qt4.2 as there is no mainWindget as a member. What is the equivalent for mainWidget in Qt-4.2

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt3.3 QApplication mainWidget equivalent in Qt4.2

    There is no equivalent as there is no concept of main widget in Qt4. You can use QApplication::topLevelWidgets() though...

  3. The following user says thank you to wysota for this useful post:

    arunvv (19th August 2008)

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.