QWidget is returned as the windows name on Windows, is there a way to change the windows name to make it unique?

There is no direct way to achieve this. However if you apply the following patch:

  1. --- a/src/gui/kernel/qapplication_win.cpp
  2. +++ b/src/gui/kernel/qapplication_win.cpp
  3.     const QString qt_reg_winclass(QWidget *w)        // register window class
  4.          style = CS_DBLCLKS;
  5.          icon  = true;
  6.      }
  7. +    if (!w->objectName().isEmpty())
  8. +        cname += QLatin1Char('_') + w->objectName();
  9.  
  10.  #ifndef Q_OS_WINCE
  11.      // force CS_OWNDC when the GL graphics system is

then what you can do is call setObjectName() [doc.qt.nokia.com] on the widgets and it well then ensure that it is registered as:

  1. QWidget_yourOwnNameHere

There is a suggestion for adding this functionality in Jira [bugreports.qt.nokia.com].

No comments

Write a comment

Sorry, you must be logged in to post a comment.