Results 1 to 2 of 2

Thread: Custom widget plugin problem

  1. #1
    Join Date
    Apr 2007
    Location
    Sunny Darwin, NT Australia
    Posts
    186
    Thanks
    29
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Custom widget plugin problem

    I've created 2 Qt Designer plugins. One is a TabbedWidget and the other is a ComboBox.
    Problem is when I insert it, it draws a border above and below it (see image) The comboBox plugin is wedged between 2 textEdits and you can see only half of it is visible, the bottom half is covered by the lower textEdit. I tried to reduce the QObject frame it sits in when I created it as small as possible but it won't reduce down to the size of the widget, there's always the title bar and some space below the widget, this (I think) is what is visible when used in another object..

    How do I fix it ?

    You may ask why would I want to create a comboBox plugin ?
    Because I want to add several features (including sql lookup function) and re-use it several times in the in my Tabbed widget plugin and other places in my app.

    The alternative was to duplicate code in the parent app.
    If anyone has a better way, I'm all ears
    Attached Images Attached Images
    Last edited by vieraci; 27th October 2007 at 13:19.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Custom widget plugin problem

    Have you noticed Qt Designer's widget promoting feature? You could place a plain QComboBox on the form and tell Qt Designer to actually handle it as your custom combo box. It looks and acts like a normal QComboBox in Qt Designer but in the uic's generated code it will be an instance of your custom class.
    J-P Nurmi

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

    vieraci (27th October 2007)

Similar Threads

  1. Problem with custom container widget
    By MrGarbage in forum Qt Tools
    Replies: 4
    Last Post: 25th August 2007, 03:37
  2. Problem applying setWindowOpacity to a custom Widget
    By yellowmat in forum Qt Programming
    Replies: 8
    Last Post: 1st November 2006, 10:05
  3. Custom Widget Plugin Analog Clock
    By kemp in forum Qt Programming
    Replies: 8
    Last Post: 11th August 2006, 13:22
  4. Replies: 3
    Last Post: 12th April 2006, 08:20
  5. Replies: 12
    Last Post: 15th February 2006, 10:46

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.