Am Thursday 11 June 2009 schrieb John-Paul Stanford:
> 1) Am I doing the correct thing to add a dialog?
if this asks whether you do the right steps to get some overlay dialog into your game: yes.
if this asks whether it's the right thing to do: i have no idea ;-)


> 2) How to I make the dialog appear at different positions within the
> dialog?
dialog within the scene? just move it around (QWidget::move())


> 3) What do I need to do to make it a window (can be closed and moved)?
you can try to use a QMdiSubWindow (QDockWidget) - but i have no idea whether it works outside a QMdiArea (inside a scene) and the look will be probably not entirely configurable by stylesheeets (e.g. regarding button positions)


another way (if you want to achive exactly the mock or the subwindow/dockwiget does not survive in your context) was to alter the ChatPane and implement you own little "windowmanager"


that's not hard:
- catch the mousepress/release events, save the state and handle the mousemoveevents in accordance - i think i've done that a dozen times, ask if you need some code snippet
- add a push or toolbuttons (as you like it) and bind the "clicked" signal to the windows close slot
- to achieve that shape you can:
set a gradient background (even via stylesheet) that creates a hard border (0:blue, 0.3:blue, 0.301:transparent)
- set a mask on the widget
- create an independent widget for the titlebar (i.e. parented by the scene) that just attaches and moves/closes the actual dialog


> 4) Is the QT Stylesheet going to be able to resyle the in game windows
> similar to the mockup?
if you use the proper sheet: yes.
(personal and mean note - scnr:
red on blue? are you kidding? do you sell glasses? maybe rethink colors...)


Thomas