Results 1 to 3 of 3

Thread: Constructor wont accept more paramters.

  1. #1
    Join Date
    Jul 2013
    Posts
    27
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    11

    Default Constructor wont accept more paramters.

    Hello friends, I am sorry for the vague subject heading. I have a class called selectionDemo. It creates image labels using another class called designLabel. Design label needs 3 parameters to work. this class definition goes like selectionDemo::selectionDemo(param1, param2, param3) : (param1) , (param2),(param3). There are certain push buttons which i have created and mapped the signals. The slot is already in this class which shows me which push button. The function of the push button is to change the image displayed. But for changing the image i must call the constructor, but it wont accept the 4th parameter. What shall i do? Kindly let me know.

  2. #2
    Join Date
    May 2013
    Posts
    321
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    9
    Thanked 8 Times in 8 Posts

    Default Re: Constructor wont accept more paramters.

    Why you don't add a function who return a pointer to the widget who shows the image and change the image using that ?

  3. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default Re: Constructor wont accept more paramters.

    This is a rather useless description of the problem.

    There is no error message, no class declarations, no constructor definitions, basically nothing to analyze for either the cause of the problem nor for finding any solution.

    Cheers,
    _

Similar Threads

  1. Accept/Not accept symbols in QLineEdit
    By naturalpsychic in forum Qt Programming
    Replies: 2
    Last Post: 28th March 2012, 17:26
  2. Replies: 1
    Last Post: 20th April 2011, 17:23
  3. Program wont start - Wont even enter main()
    By ComServant in forum General Programming
    Replies: 5
    Last Post: 8th January 2011, 04:44
  4. Replies: 3
    Last Post: 22nd August 2008, 08:46
  5. OSX App wont run on other machines
    By December in forum Qt Programming
    Replies: 3
    Last Post: 13th April 2007, 03:23

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
  •  
Qt is a trademark of The Qt Company.