PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 1028 - QWidget winId missing
: QWidget winId missing
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: QtGui
: HEAD
: PC Mac OS
: P3 normal
Assigned To: Paulo Alcantara
:
:
:
  Show dependency treegraph
 
Reported: 2011-10-20 23:05 EEST by Henrik
Modified: 2011-11-29 21:28 EET (History)
10 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henrik 2011-10-20 23:05:51 EEST
I compiled latest revision from the git repository (wed. 19.okt) against
qt4-x11. Compilation went fine, but the winId() method seems to be missing from
the QWidget class:
>>> from PySide import QtGui
>>> QtGui.QWidget.winId
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: type object 'PySide.QtGui.QWidget' has no attribute 'winId'
Comment 1 Paulo Alcantara 2011-11-04 16:23:31 EET
Hi Henrik,

I can't reproduce this bug from mainline, which means any aleatory commit
suddenly fixed this issue already.

These were the commit hashes of each application upon which I built and then
tried to reproduce this issue.

Apiextractor:                   af04266b152f4b3010464eebf0ffe0d53c66a43a
Generatorrunner:                b6f64d342c0dd3926eb675c75f040d12840a9043
Shiboken:                       49d4a9d663bc89838ef8579999ac3f4808a905d0
PySide:                         f1fe0a3831022cf2e2dd352ad9b67f8ef72031c9


I'd recommend you to test it from either mainline or waiting for a new PySide
release.



                    Paulo
Comment 2 Hugo Parente Lima 2011-11-07 19:03:36 EET
Paulo, did you test using MacOS? or just Linux?
Comment 3 Paulo Alcantara 2011-11-07 19:18:05 EET
Hi Hugo,

I tested it in both, and it didn't break either.

Here's the part of its test on Mac OS:

        Start 243: QtGui_bug_1028

243: Test command: /usr/bin/python2.6
"/Users/buildbot/build/piupiu-mac/build/PySide/tests/QtGui/bug_1028.py"
243: Test timeout computed to be: 60
243/400 Test #243: QtGui_bug_1028 ..................................   Passed  
 0.13 sec

You can find the commit I used for testing it on:
https://github.com/pcacjr/PySide/commit/7fcd6017ce03d187064e3749eee5c96b057db1d0.



                 Paulo
Comment 4 Henrik 2011-11-07 21:26:14 EET
I almost forgot to mention that i had to make a hack in CMakeLists.txt to get
it to compile. during configuration i got the error Unsupported OS. I tried
again with latest revision, i did not get an error while configuring, but
during compilation it chocked on this message:
In file included from
/Users/henrik/pyside/pyside/build/PySide/QtGui/PySide/QtGui/qabstractbutton_wrapper.cpp:39:
/Users/henrik/pyside/pyside/build/PySide/QtGui/PySide/QtGui/pyside_qtgui_python.h:1704:
error: ‘::QMacStyle’ has not been declared
/Users/henrik/pyside/pyside/build/PySide/QtGui/PySide/QtGui/pyside_qtgui_python.h:1704:
error: ‘::QMacStyle’ has not been declared
/Users/henrik/pyside/pyside/build/PySide/QtGui/PySide/QtGui/pyside_qtgui_python.h:1704:
error: parse error in template argument list
/Users/henrik/pyside/pyside/build/PySide/QtGui/PySide/QtGui/pyside_qtgui_python.h:1704:
error: template-id ‘SbkType<<expression error> >’ for ‘PyTypeObject*
Shiboken::SbkType()’ does not match any template declaration

i tried the CMakeLists hack from previous time:
comment out the os detection
"""
# Configure OS support
set(ENABLE_X11 "0")
set(ENABLE_MAC "0")
set(ENABLE_WIN "0")
set(ENABLE_SIMULATOR "0")
if(Q_WS_X11)
    set(ENABLE_X11 "1")
    if(Q_WS_MAEMO_5)
        set(AUTO_OS "maemo")
    else()
        set(AUTO_OS "x11")
    endif()
elseif(Q_WS_MAC)
    set(ENABLE_MAC "1")
    set(AUTO_OS "mac")
elseif(Q_WS_WIN)
    set(ENABLE_WIN "1")
    set(AUTO_OS "win")
elseif(Q_WS_SIMULATOR)
    set(ENABLE_SIMULATOR "1")
    set(AUTO_OS "simulator")
else()
    message(FATAL_ERROR "OS not supported")
endif()
message(STATUS "Detected OS: ${AUTO_OS}")
"""
and replaced it with 
set(ENABLE_X11 "1")
set(AUTO_OS "x11")


with these additional settings i managed to get it to compile:
QT_QMAKE_EXECUTABLE: /sw/lib/qt4-x11/bin/qmake
GL_H:  -I/usr/X11R6/include
CMAKE_CXX_FLAGS: -I/usr/X11R6/include
ENABLE_MAC_STYLE: False
ENABLE_GTK_STYLE: True
shiboken is linked to python2.7 from /Library/Frameworks

The winId() functions was present in the last compile and basic Qt seems to
work, but im not sure everything is healthy, as it segfaults in conjunction
with pythonOCC, but im not sure whos the culprit.

I used qt4-x11 from fink, Framework python 2.7 on osx 10.6
Comment 5 Paulo Alcantara 2011-11-24 19:42:01 EET
Hi Henrik,

As neither me or you didn't get this bug reproduced then I'll close this bug
for now.
Comment 6 Luciano Wolf 2011-11-29 21:28:39 EET
Released on PySide 1.0.9. Closing.