Results 1 to 4 of 4

Thread: How to create a custom dock widget like QtDesigner

  1. #1
    Join Date
    Jun 2007
    Location
    Louisiana
    Posts
    77
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default How to create a custom dock widget like QtDesigner

    I would like to create a custom dock widget for my QMainWindow that looks and works very similar to the properties dock widget in QDesigner.

    I have custom widgets that have properties I wish to allow the user to interact with through this custom dock widget. This will happen outside the QtDesigner - in my application - so I don't think the QDesignerExtensionxxx stuff will apply.

    I am able to insert a list widget into a QDesigner dock widget and manipulate the background colors and other properties to look like I want -- but it does not work the same (layout changes do not follow the window resize, etc.)

    Is it possible to simulate the properties dock widget in any other way that I is not completely obvious to me now?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to create a custom dock widget like QtDesigner

    What you want is called a property browser and it should be available for download somewhere on Qt's git repo.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: How to create a custom dock widget like QtDesigner

    The QtPropertyBrowser tool is here. But I can tell you that it is incredibly hard to use if you want any kind of custom properties. It's hard to use even for editing simple things.

    Get it now, because gitorious.org is going away and if no one claims responsibility for this code, it might disappear.

  4. #4
    Join Date
    Jun 2007
    Location
    Louisiana
    Posts
    77
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to create a custom dock widget like QtDesigner

    The code for the qtpropertybrowser and support modules is now in Qt5. I found this out in a thread on another forum.

    It is laid out like a static lib. I tried to convert to a shared lib. It compiles and links without error -- however, when the lib is included in the application, I get 8 errors from the linker -- all relating to QtAbstractPropertyBrowserPrivate - invalid use of incomplete type class from the moc_qtpropertybrowser.cpp source.

    A look at the code indicates this is a forward declaration in the form:
    Qt Code:
    1. class QtAbstractPropertyBrowserPrivate;
    To copy to clipboard, switch view to plain text mode 
    and not intended to have a defined type in the forward declare.

    That being the case, the error messages do not make a lot of sense. Any idea what this may be trying to indicate?

    Env: Qt 5.4.1 on Linux Mint 17.1

Similar Threads

  1. Dock Widget Custom Resizing?
    By qtoptus in forum Qt Programming
    Replies: 2
    Last Post: 2nd April 2014, 23:35
  2. Create custom plugin into qtdesigner with qt5 alpha
    By alizadeh91 in forum Qt Programming
    Replies: 0
    Last Post: 1st December 2012, 07:39
  3. Replies: 7
    Last Post: 15th November 2012, 14:22
  4. create dock widget from some other widget
    By Onanymous in forum Qt Programming
    Replies: 1
    Last Post: 16th December 2011, 15:22
  5. Replies: 1
    Last Post: 25th October 2006, 15:41

Tags for this Thread

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.