Results 1 to 5 of 5

Thread: Container plugins

  1. #1
    Join Date
    Jul 2008
    Posts
    27
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Container plugins

    I have been working for sometime (few weeks) with the Designer. It is very useful when you get its tricks, although I still have some confusion about sizes,resize and size policies. But that is not the point of this thread.
    I had to make some plugins, and I read documentation examples. My plugins work fine, but I have some questions about container plugins. Lets say I have a plugin that is just a widget with 2 group boxes in an horizontal layout. I make a plugin with that, returning yes in isContainer, of course, then , how do I put, for example, a label in a layout in the first group box? Can I do that? Is the whole plugin is just like one widget and I cant reffer just to one of its components?
    It would be really,really,really useful to me. I miss more detailed examples to make it easier to see all (or at least more) of the Designer and its plugins power.

    Thank you very much.
    If God has friends ,then I cant be God.

  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: Container plugins

    Designer is not really meant to handle such cases. A container widget is meant to be a widget that you can apply a layout on. If you want more control, you can have a multi-page container plugin and maybe this is something for you. You can then specify which page is active and you can add widgets to the active page (and apply layouts to it). Actually you can add a widget to any page, but to apply a layout some page has to be active.

  3. The following user says thank you to wysota for this useful post:

    Benne Gesserit (17th November 2008)

  4. #3
    Join Date
    Jul 2008
    Posts
    27
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Container plugins

    Thank you very much for yor answer wysota.
    I think that way the Designer works makes much sense, but I would be great to be able to desing things like I explained. I have some dialogs, and I need to extend these dialogs to use them in other situations. As I said, I integrated my dialogs in the Desginer. But if I re-use them I lose lots of space because I cant put a layout on a single group box (for example). It would be also great,at least for me, that you could use inheritance instead of composition when using you own integrated widgets.
    Well, I am not an expert on Qt and I dont know if such things can be done , I just find them interesting.

    Thank you very much again.
    If God has friends ,then I cant be God.

  5. #4
    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: Container plugins

    I think you should let your users design each "groupbox" separately in Designer and then use hand written code to embed those widgets inside appropriate "groupboxes".

  6. #5
    Join Date
    Jul 2008
    Posts
    27
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Container plugins

    Thats interesting. When I have sometime I will think about that. Right now I am using a rude design because I havent got much time. It uses very much layout space and the code for the widgets it is a little bit ugly, but it works. The thing is that each widget anyone creates in my application needs to use another widget, it extends another widget. It s hard to explain. For example lets say I have a widget that is this quick reply frame but without any button. I make a plugin of it and someone decides to extend it and put a group bos with the bold and italic buttons. If they put this last extended "widget" back on the designer and someone wanted to put the underline button, wont he/she find problems with the layout? I think that s very much my problem. Users can make extended widgets and layoutt problems (and other problems) or single widgets, put them together on one widget and have conection problems.
    I will have to think about that.
    (hopefuly I explained myself fine)

    Thank you very much
    If God has friends ,then I cant be God.

Similar Threads

  1. Replies: 1
    Last Post: 31st October 2008, 14:35
  2. Qt Plugins Error
    By nathanpackard in forum Qt Programming
    Replies: 1
    Last Post: 17th August 2007, 23:19
  3. Container Extensions
    By mariok in forum Qt Programming
    Replies: 1
    Last Post: 3rd July 2007, 11:06
  4. Qt plugins - how to do a libtool-style autoload
    By KShots in forum Qt Programming
    Replies: 2
    Last Post: 7th February 2007, 12:40
  5. Arthur Plugins demos and designer
    By antonio.r.tome in forum Installation and Deployment
    Replies: 4
    Last Post: 21st March 2006, 14:01

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.