Results 1 to 2 of 2

Thread: custom widgets: passing new parameters to constructor (not only QWidget *parent)

  1. #1
    Join Date
    Apr 2010
    Posts
    4
    Thanks
    1

    Default custom widgets: passing new parameters to constructor (not only QWidget *parent)

    Hello everyone,

    I am trying to integrate a custom widget that I created. But I am having problems because my widget receives in its constructor no only the QWidget *parent but other parameters. I want it to integrate it into QT designer, either as a plugin or as a custom widget but I cannot find the way to tell QT Designer that it has more parameters in the constructor...

    i.e. my custom widget constructor looks like this

    EMI12Interface(AMManager *manager,QWidget *parent);

    EMI12Interface is a QWidget but it receives no only a QWidget *parent in its construction but some other parameters...

    At the time that I add my custom widget to QT Designer and QT Designer autogenerates my source file, my QWidget is created as :

    eMI12Interface1 = new EMI12Interface( ECGWidget, "eMI12Interface1" );

    and this are not the arguments that I want... How can I tell QT Designers to create my QWidget with other arguments?

    Thanks for the help!
    Mario

  2. #2
    Join Date
    Oct 2009
    Posts
    151
    Thanks
    6
    Thanked 13 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: custom widgets: passing new parameters to constructor (not only QWidget *parent)

    Perhaps I'm missing something in your question but you just include them as arguments to the constructor:

    EMI12Interface(AMManager *manager, QWidget *parent, int i, char *c ..... );

Similar Threads

  1. passing parameters to Active-x in hash does not work
    By yazwas in forum Qt Programming
    Replies: 0
    Last Post: 26th February 2010, 11:53
  2. Replies: 7
    Last Post: 23rd January 2010, 22:59
  3. default parameters in constructor class
    By mickey in forum General Programming
    Replies: 4
    Last Post: 23rd February 2008, 18:44
  4. Replies: 2
    Last Post: 27th March 2007, 12:09
  5. Replies: 2
    Last Post: 17th October 2006, 19:25

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.