Results 1 to 11 of 11

Thread: Very strange behavior of QWidget in Qt Designer

  1. #1
    Join Date
    Mar 2007
    Location
    Ukraine, Odessa
    Posts
    140
    Thanks
    15
    Thanked 11 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Very strange behavior of QWidget in Qt Designer

    Hi everyone

    I've encountered a strange error while working with Qt Designer and my custom widget. I have several widgets in a horizontal layout. Most of them are QPushButtons and some are my custom widgets. To cut the long story short here is a screenshot

    First of all its obvious that the widget (which I've replaced by the way with an empty QWidget) is not centred properly. When I try to set another minimal height to this widget it expands as if it had a strange padding.

    Honestly I am confused
    Last edited by THRESHE; 19th June 2008 at 17:18.
    C++ & AMD forever

  2. #2
    Join Date
    Mar 2007
    Location
    Ukraine, Odessa
    Posts
    140
    Thanks
    15
    Thanked 11 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Very strange behavior of QWidget in Qt Designer

    Any ideas ??
    C++ & AMD forever

  3. #3
    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: Very strange behavior of QWidget in Qt Designer

    Are you using a custom widget plugin or just promoting?

    PS. Don't use links to external sites but attach the image on this forum next time, please.
    J-P Nurmi

  4. #4
    Join Date
    Mar 2007
    Location
    Ukraine, Odessa
    Posts
    140
    Thanks
    15
    Thanked 11 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Very strange behavior of QWidget in Qt Designer

    Hi. I was waiting for a reply too long so I didn't check this thread

    I'm using my custom widget as a plug-in. I thought that is obvious
    Last edited by THRESHE; 12th August 2008 at 16:10.
    C++ & AMD forever

  5. #5
    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: Very strange behavior of QWidget in Qt Designer

    Well, after looking at the screenshot it's not so clear which is what. I guess QFilmOnSlider is the custom widget provided by a plugin. If it's not looking correct in the screenshot, how should it look like? Remember that we don't really know what you're implementing. Does the custom widget work properly in a layout? I mean, if you don't use Qt Designer but place the widget into a simple layout directly in code.
    J-P Nurmi

  6. #6
    Join Date
    Mar 2007
    Location
    Ukraine, Odessa
    Posts
    140
    Thanks
    15
    Thanked 11 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Very strange behavior of QWidget in Qt Designer

    Quote Originally Posted by jpn View Post
    Well, after looking at the screenshot it's not so clear which is what.
    My bad
    Here it is.
    Quote Originally Posted by jpn View Post
    Does the custom widget work properly in a layout? I mean, if you don't use Qt Designer but place the widget into a simple layout directly in code.
    Honestly I didn't try to do this outside the Designer
    Attached Images Attached Images
    C++ & AMD forever

  7. #7
    Join Date
    Mar 2007
    Location
    Ukraine, Odessa
    Posts
    140
    Thanks
    15
    Thanked 11 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Very strange behavior of QWidget in Qt Designer

    Where are you jpn ?
    C++ & AMD forever

  8. #8
    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: Very strange behavior of QWidget in Qt Designer

    Honestly, I don't know what should I say, or what do you expect... Personally I would first assure that my custom widget works in layouts before even trying to integrate it to Qt Designer.
    J-P Nurmi

  9. #9
    Join Date
    Mar 2007
    Location
    Ukraine, Odessa
    Posts
    140
    Thanks
    15
    Thanked 11 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Very strange behavior of QWidget in Qt Designer

    Quote Originally Posted by jpn View Post
    Personally I would first assure that my custom widget works in layouts before even trying to integrate it to Qt Designer.
    How can I do that?
    C++ & AMD forever

  10. #10
    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: Very strange behavior of QWidget in Qt Designer

    Create a test app. Install a layout on the window and add different widgets to the layout (including your custom widgets) and check how it behaves when you resize the window.
    J-P Nurmi

  11. #11
    Join Date
    Mar 2007
    Location
    Ukraine, Odessa
    Posts
    140
    Thanks
    15
    Thanked 11 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Very strange behavior of QWidget in Qt Designer

    Damn I forgot when I place a simple plain widget to the layout it behaves the same
    Attached Images Attached Images
    C++ & AMD forever

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.