Results 1 to 3 of 3

Thread: Designer and QWorkspace

  1. #1
    Join Date
    Feb 2006
    Location
    US
    Posts
    173
    Thanks
    16
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Android

    Default Designer and QWorkspace

    Hello,

    Any reason why Designer was "designed" such that you can't specify a QWorkspace as the central widget for a QMainWindow?

    Since this is the case, what is the orthodox way to use Designer (rather than coding by hand) to produce a main UI such that it uses the QWorkspace. Should I write a pre-code-generation-script that automatically converts the contents of the UI file from:
    <widget class="QWidget" name="centralwidget" /
    to
    <widget class="QWorkspace" name="centralwidget" /

    Thanks,
    Ben

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Designer and QWorkspace

    Simply create an empty form using the Main Window template, save it as a new template and change QWidget to QWorkspace in the .ui file of that template. From now on, using that template, you can create main windows with a QWorkspace as the main widget.

  3. #3
    Join Date
    Feb 2006
    Location
    US
    Posts
    173
    Thanks
    16
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Designer and QWorkspace

    Ignoring the obvious ... doh!

Similar Threads

  1. Qworkspace
    By weepdoo in forum Qt Tools
    Replies: 4
    Last Post: 24th July 2006, 10:37
  2. Main window
    By Michiel in forum Qt Tools
    Replies: 1
    Last Post: 20th March 2006, 23:54

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.