2 Attachment(s)
Make widgets float inside of qapplication main window
Hi -
I am upgrading our qt-based application to qt4 from qt3. The application has a main window and then dynamically loadable modules (as widgets).
I want the module windows to be floating windows inside of the main application window, however I can't seem to get this to work that way.
I can only get them either take up the entire main window space (as shown in shot1.png) or be floating, individual windows that are separate from the main window (they can be dragged outside the main application window and don't get closed when then main window closes).
For both cases (shot1.png and shot2.png), my widget constructor has the following:
Code:
DataRecorder
::Panel::Panel(QWidget *parent,
size_t buffersize
) : QWidget(parent
), RT
::Thread(RT
::Thread::MinimumPriority), fifo
(buffersize
), recording
(false) {
setAttribute(Qt::WA_DeleteOnClose);
In shot1.png, I have the following in my main_window.cpp file:
Code:
MainWindow
::MainWindow (void) : QMainWindow(NULL, Qt
::Window) {
setCentralWidget(centralWidget);
((QWorkspace *)centralWidget
)->setScrollBarsEnabled
(true);
and in shot2.png I have that commented out.
Any help is appreciated
Attachment 10155Attachment 10156
Re: Make widgets float inside of qapplication main window
Not sure it you want QMdiArea or QDockWidgets