|
|||||||
| Qt Programming General Qt programming issues. |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#21
|
|||
|
|||
|
Thanks , it works successfully .
I 've one more question : - I've added many QWidgets into stack . Now I need when the turn comes to a particular widget to be shown , I can access its variables . Qt Code:
As a result of that , CustomSlot3 'll go to index [3]. I've an error that tells ms : Invalid Conversion QWidget* to CustomSlot3* Thanks . |
|
#22
|
|||
|
|||
|
I suggest you keep all pointers as member variables of the containing class and access them directly instead of fetching the pointer through current widget of the stack (it is possible of course - you'd have to cast the pointer received to a proper type).
|
|
#23
|
|||
|
|||
|
It has been a long time since my last reply .
Things were going so fine & the resources over web were extremely helpful . Currently , I was looking for property/function that DeActivate child widget (e.g. If I've a Widget that has a QPushButton . When the user press that button another widget 'll be shown & TOTALLY DeActivate the previouse widget . So the user won't be able even to close / maximize/minimize the old widget ) I've tried : isActiveWindow():Just make the widget on top . setEnabled isable all the controls into widget but not the toolbar (i.e. the user will be able to close / maximize/minimize widget)Thanks . |
|
#24
|
|||
|
|||
|
I've found a solution to the problem :
Qt Code:
|
|
#25
|
|||
|
|||
|
Now I've 2 issues :
1- How could I also disable "Maximize" & "Minimize" ? 2- How could I enable them after I've just disabled them ? Thanks . |
|
#26
|
|||
|
|||
|
I've solved the 2nd issue by :
Qt Code:
|
|
#27
|
|||
|
|||
|
Why would you want to disable maximizing/minimizing a window? Don't you think it is an extreme interference in the user's desktop? As for closing, you don't need any windows related functions, simply reimplement closeEvent() for your widget and ignore the event if you want to prevent the window from being closed. You can disable the maximize/minimize buttons if you really want to, by either hiding them using window flags or by removing the window from the window manager's control (by using window flags again). To disable the contents of a window simply disable() it (or setEnabled(false)).
|
| The following user says thank you to wysota for this useful post: | ||
Fatla (23rd July 2008) | ||
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Error in put one QWidget in another QWidget | xjtu | Qt Programming | 1 | 19th April 2008 16:05 |
| Keeping QWidgets as private QWIdget subclass members | mtrpoland | Newbie | 2 | 1st January 2008 13:31 |