Author Topic: Qwidgetstack  (Read 7304 times)

nilch

  • Hero Member
  • *****
  • Posts: 668
    • View Profile
    • http://
Qwidgetstack
« on: March 20, 2006, 01:24:00 pm »
I am using the QWidgetStack to create a sideBar element in my program which can change on context - a context sensitive changing sideBar menu element.

So I am adding widgets into the WidgetStack and them calling the widgetStack control in the main screen. On the desktop - this method works fine and I can raiseWidgets as needed to the front.

But on the Zaurus, the whole widgetStack control doesnt show up at all.
There are no errors when using QWidgetStack on Qt/E, but nothing shows at all.

What is heppening here ?Is the QWidgetStack implementation the same in QT/E as in QT.

Code sample as below
-----------------------------
class controlWidgets(QWidgetStack) :
    def __init__(self,parent = None,name = None):
        QWidgetStack.__init__(self,parent,name)

        if name == None:
            self.setName('')

        self.setSizePolicy(QSizePolicy(4,7,self.sizePolicy().hasHeightForWidth()))
        self.setMinimumSize(QSize(90,120))
        self.setMaximumSize(QSize(160,420))
       
        self.widgetMain = controls(self)        # control is the main widget class
        self.widgetLocal = controlLocal(self) #controlLocal is a local widget
        self.addWidget(self.widgetMain,1)
        self.addWidget(self.widgetLocal,2)

in the main section I call controlWidgets as below
--------------------------------
self.sideBar = controlWidgets(self)
             self.sideBar.setSizePolicy(QSizePolicy(0,0,self.sideBar.sizePolicy().hasHeightFo
Width()))
self.layoutSideBar.addWidget(self.sideBar)
self.sideBar.show()



I have read on other threads that the QWidgetStack on QT/E has a bug - is this the reason for the non-visibility of the WidgetStack control on the Zaurus ?
New no more-C1000 / 5000D (sold my 6000 and 750) | Cacko ROM 1.23 on C1000 | 256 MB CF | 2GB PNY SD card | Socket Networker WiFi CF Card | USB Host cable from StreamlineCPUS | Mini Microphone (for voice recording) |

nilch

  • Hero Member
  • *****
  • Posts: 668
    • View Profile
    • http://
Qwidgetstack
« Reply #1 on: March 21, 2006, 11:56:49 am »
Sorry guys... found the solution - was a bit foolhardy in not trying it earlier.

I seems on QT/E on the Zaurus you need to give an explicit raiseWidget call after defining and populating the WidgetStack  to show the first widget.
Otherwise nothing shows up at all - just a blank stack.

On the desktop (regular QT) however an explicit raiseWidget call is not required. Just calling the widgetStack control with the widgets added to it will show the index 0 widget by default.

So that was what stumped me at first.
New no more-C1000 / 5000D (sold my 6000 and 750) | Cacko ROM 1.23 on C1000 | 256 MB CF | 2GB PNY SD card | Socket Networker WiFi CF Card | USB Host cable from StreamlineCPUS | Mini Microphone (for voice recording) |

netog

  • Newbie
  • *
  • Posts: 38
    • View Profile
    • http://
Qwidgetstack
« Reply #2 on: April 02, 2006, 07:52:52 pm »
Hi. Just as curiosity... have you tried to use python and mysql working together at the zaurus?

I was wondering if this could be a good GUI solution for some apps I need to do with DB  support.

Tanks

Neto G

nilch

  • Hero Member
  • *****
  • Posts: 668
    • View Profile
    • http://
Qwidgetstack
« Reply #3 on: April 13, 2006, 12:42:50 pm »
Hi netog,

I haven't yet tried Python with MySQL, but I am sure it should work.

There is a MySQL module for python so that one can easily make calls to the database. So far I have used very small datasets and have strored them as XML files rather than a full-blows database.

for more on MySQL module...
http://www.devshed.com/c/a/Python/MySQL-Co...ty-With-Python/

I think Python with PyQT makes a very good GUI based application tool.
New no more-C1000 / 5000D (sold my 6000 and 750) | Cacko ROM 1.23 on C1000 | 256 MB CF | 2GB PNY SD card | Socket Networker WiFi CF Card | USB Host cable from StreamlineCPUS | Mini Microphone (for voice recording) |