Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6915187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:26:38+00:00 2026-05-27T09:26:38+00:00

I have a graphics view wrapper defined as MyQGraphicsView::MyQGraphicsView(QWidget *parent) : QGraphicsView(parent) Within this,

  • 0

I have a graphics view wrapper defined as MyQGraphicsView::MyQGraphicsView(QWidget *parent) : QGraphicsView(parent)

Within this, I am trying to set a timed GUI update event with QTimers.

public slots:
    void colourGUI(std::vector<Item *> &items);

However, when I try to call it, I get an error. Here is how I’m calling it…

// timer...
QTimer *timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), this, SLOT(colourGUI(items)));
timer->start(2000);

I get the following error:

Object::connect: No such slot MyQGraphicsView::colourGUI(items)

What gives? Have I set this up wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T09:26:38+00:00Added an answer on May 27, 2026 at 9:26 am

    There are multiple problems with your code. First, you are trying to connect a signal and slot with different signatures.

    You would need(1)

    connect(timer, SIGNAL(timeout(std::vector<Item*>)), this, SLOT(colourGUI(std::vector<Item*>)));
    

    instead of:

    connect(timer, SIGNAL(timeout()), this, SLOT(colourGUI(items)));
    

    However this will only work if the Qt metaobject system knows how to marshal this type, but it doesn’t. You either need to register it or use one of the Qt collections, for example QList. And timer doesn’t have such signal anyway.

    (1) the SLOT “description” must not contain argument names and must contain the types of the arguments in order to be able to marshal them correctly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Qt's graphics view frameworks is very powerful, but I have not found a way
I have some graphics files that exist within a directory that a web server
I have a custom view onto which I draw some graphics from the drawrect
i have a Custom view ... package nan.salsa.goal.customview; import android.R; import android.content.Context; import android.graphics.Canvas;
I have a MFC document/view C++ graphics application that does all its drawing to
I have an application that, to this point, is mostly DirectX 10 3D graphics.
I have a view to which I want to set a drawable image which
I have a graphics editing cocoa app on Mac OSX that produces 32 by
I have a Graphics object of JPanel and that is working fine: import java.awt.Color;
Here's the situation: We have some generic graphics code that we use for one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.