Results 1 to 2 of 2

Thread: UI headers does not compile

  1. #1
    Join Date
    Jan 2008
    Posts
    155
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default UI headers does not compile

    I am not sure where this post belongs, Designer or Qt Programming, but I get a compile error after I apply "Layout in a Grid" on a groupbox in Designer, so I start it here.
    My IDE (Xcode 3.0) says "error: '1' cannot be used as a function"
    pointing at several lines in the ui_mydialog.h file, e.g.:
    Qt Code:
    1. gridLayout_13->setSpacing(1());
    2. gridLayout_13->setMargin(1());
    To copy to clipboard, switch view to plain text mode 
    In the ui file, the layout spacings for the groupbox is set to -1, and the margins are all 12, untouched by me.

    The layout looks nice, applying "Grid layout" on the groupbox arranges the contents better than without it.

    Where is the problem?

    If I manually edit out the offending lines 1() -> -1 it compiles, but this is not a solution I want to live with.

    I am using Qt 4.4.0 for MacOSX.
    MacOSX user dabbling with Linux and Windows.

  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: UI headers does not compile

    You edited the form settings, right? And you changed the layout margin function to "1", right? Then don't do that Choose your grid and in the property editor set the margin.

Similar Threads

  1. spaning the headers in the QTableView
    By ru_core in forum Qt Programming
    Replies: 6
    Last Post: 11th June 2013, 13:17
  2. Problem compile QT embedded 3.3.6
    By webquinty in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 27th June 2008, 08:55
  3. qtgui4.dll error in visual c++ 2005
    By Comptrol in forum Installation and Deployment
    Replies: 33
    Last Post: 19th June 2008, 07:18
  4. deleting selected headers
    By ru_core in forum Qt Programming
    Replies: 3
    Last Post: 16th April 2008, 07:53
  5. Access to PostgreSQL DB on a linux server
    By rmagro in forum Qt Programming
    Replies: 28
    Last Post: 13th March 2008, 09:02

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.