René's URL Explorer Experiment


Title: tutorial6: when and why do I have to add *parent as a class parameter and when not? · Issue #5 · MeLikeyCode/QtGameTutorial · GitHub

Open Graph Title: tutorial6: when and why do I have to add *parent as a class parameter and when not? · Issue #5 · MeLikeyCode/QtGameTutorial

X Title: tutorial6: when and why do I have to add *parent as a class parameter and when not? · Issue #5 · MeLikeyCode/QtGameTutorial

Description: hi, as tp tutorial6: when do I have to add *parent as a class parameter and when not? e.g., not: .cpp Bullet::Bullet(): QObject(), QGraphicsRectItem(){ setRect(0,0,10,50); QTimer * timer = new QTimer(this); connect(timer,SIGNAL(timeout()...

Open Graph Description: hi, as tp tutorial6: when do I have to add *parent as a class parameter and when not? e.g., not: .cpp Bullet::Bullet(): QObject(), QGraphicsRectItem(){ setRect(0,0,10,50); QTimer * timer = new QTim...

X Description: hi, as tp tutorial6: when do I have to add *parent as a class parameter and when not? e.g., not: .cpp Bullet::Bullet(): QObject(), QGraphicsRectItem(){ setRect(0,0,10,50); QTimer * timer = new QTim...

Opengraph URL: https://github.com/MeLikeyCode/QtGameTutorial/issues/5

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"tutorial6: when and why do I have to add *parent as a class parameter and when not?","articleBody":"hi,\r\nas tp tutorial6:\r\nwhen do I have to add *parent as a class parameter and when not?\r\n\r\ne.g., not:\r\n.cpp\r\n```\r\n\r\nBullet::Bullet(): QObject(), QGraphicsRectItem(){\r\n    setRect(0,0,10,50);\r\n    QTimer * timer = new QTimer(this);\r\n    connect(timer,SIGNAL(timeout()),this,SLOT(move()));\r\n    timer-\u003estart(50);\r\n}\r\n\r\n```\r\nheader:\r\n```\r\nclass Bullet: public QObject, public QGraphicsRectItem{\r\n    Q_OBJECT\r\npublic:\r\n    Bullet(QGraphicsItem * parent=0);  // parent only in header\r\npublic slots:\r\n    void move();\r\n};\r\n\r\n```\r\n\r\n\r\n\r\nbut e.g., yes:\r\n.cpp\r\n```\r\n\r\nEnemy::Enemy(QGraphicsItem *parent): QObject(), QGraphicsRectItem(parent){ // \u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\r\n    int random_number = rand() % 700;\r\n    setPos(random_number,0);\r\n    setRect(0,0,100,100);\r\n    QTimer * timer = new QTimer(this);\r\n    connect(timer,SIGNAL(timeout()),this,SLOT(move()));\r\n    timer-\u003estart(50);\r\n}\r\n\r\n```\r\nheader:\r\n```\r\nclass Enemy: public QObject, public QGraphicsRectItem{\r\n    Q_OBJECT\r\npublic:\r\n    Enemy(QGraphicsItem * parent=0);  // parent in header like above\r\npublic slots:\r\n    void move();\r\n};\r\n\r\n```\r\n\r\ni.e., why can't I just declare \r\nEnemy::Enemy(): QObject(), QGraphicsRectItem(){ ...}[/code]`\r\n similar to  the Bullet file?\r\n\r\n(ref.: https://github.com/MeLikeyCode/QtGameTutorial/tree/master/tutorial6)\r\n\r\n(edit,  \r\nBTW, in previous tutorials https://github.com/MeLikeyCode/QtGameTutorial/tree/master/tutorial1 ... https://github.com/MeLikeyCode/QtGameTutorial/tree/master/tutorial5 this \"parents\" thing has not been added at all for either class)","author":{"url":"https://github.com/dsyleixa","@type":"Person","name":"dsyleixa"},"datePublished":"2023-07-09T13:06:08.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/5/QtGameTutorial/issues/5"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:938a9927-e373-750d-68ad-d1ff7e165d1a
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idEE42:240924:1A86780:2404092:6A62F364
html-safe-nonce3337876486384afc8423103d6176bbbe841adb73ec2e1cf5d7faacda66efa439
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRTQyOjI0MDkyNDoxQTg2NzgwOjI0MDQwOTI6NkE2MkYzNjQiLCJ2aXNpdG9yX2lkIjoiNDIxNTQyNjI4NjU0NzgxMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac8e7a613f94a1a9aa4a20974a38a3e197061b89462780228bdd2650c9126e6203
hovercard-subject-tagissue:1795394126
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/MeLikeyCode/QtGameTutorial/5/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d38b4882204d5d43e35c0dbc2308932bffd0184bf19a527d3797e6fe404dbcec/MeLikeyCode/QtGameTutorial/issues/5
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d38b4882204d5d43e35c0dbc2308932bffd0184bf19a527d3797e6fe404dbcec/MeLikeyCode/QtGameTutorial/issues/5
og:image:althi, as tp tutorial6: when do I have to add *parent as a class parameter and when not? e.g., not: .cpp Bullet::Bullet(): QObject(), QGraphicsRectItem(){ setRect(0,0,10,50); QTimer * timer = new QTim...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedsyleixa
hostnamegithub.com
expected-hostnamegithub.com
Noneb415018e190e73858133ddcaa36acce7b3f3572fe54dda84bd3b21a6ec714c30
turbo-cache-controlno-preview
go-importgithub.com/MeLikeyCode/QtGameTutorial git https://github.com/MeLikeyCode/QtGameTutorial.git
octolytics-dimension-user_id6657427
octolytics-dimension-user_loginMeLikeyCode
octolytics-dimension-repository_id26611464
octolytics-dimension-repository_nwoMeLikeyCode/QtGameTutorial
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id26611464
octolytics-dimension-repository_network_root_nwoMeLikeyCode/QtGameTutorial
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release22f98521e99f504294ab0812b66104d50eb75a70
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/MeLikeyCode/QtGameTutorial/issues/5#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FMeLikeyCode%2FQtGameTutorial%2Fissues%2F5
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FMeLikeyCode%2FQtGameTutorial%2Fissues%2F5
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=MeLikeyCode%2FQtGameTutorial
Reloadhttps://github.com/MeLikeyCode/QtGameTutorial/issues/5
Reloadhttps://github.com/MeLikeyCode/QtGameTutorial/issues/5
Reloadhttps://github.com/MeLikeyCode/QtGameTutorial/issues/5
MeLikeyCode https://github.com/MeLikeyCode
QtGameTutorialhttps://github.com/MeLikeyCode/QtGameTutorial
Notifications https://github.com/login?return_to=%2FMeLikeyCode%2FQtGameTutorial
Fork 103 https://github.com/login?return_to=%2FMeLikeyCode%2FQtGameTutorial
Star 221 https://github.com/login?return_to=%2FMeLikeyCode%2FQtGameTutorial
Code https://github.com/MeLikeyCode/QtGameTutorial
Issues 5 https://github.com/MeLikeyCode/QtGameTutorial/issues
Pull requests 0 https://github.com/MeLikeyCode/QtGameTutorial/pulls
Actions https://github.com/MeLikeyCode/QtGameTutorial/actions
Projects https://github.com/MeLikeyCode/QtGameTutorial/projects
Wiki https://github.com/MeLikeyCode/QtGameTutorial/wiki
Security and quality 0 https://github.com/MeLikeyCode/QtGameTutorial/security
Insights https://github.com/MeLikeyCode/QtGameTutorial/pulse
Code https://github.com/MeLikeyCode/QtGameTutorial
Issues https://github.com/MeLikeyCode/QtGameTutorial/issues
Pull requests https://github.com/MeLikeyCode/QtGameTutorial/pulls
Actions https://github.com/MeLikeyCode/QtGameTutorial/actions
Projects https://github.com/MeLikeyCode/QtGameTutorial/projects
Wiki https://github.com/MeLikeyCode/QtGameTutorial/wiki
Security and quality https://github.com/MeLikeyCode/QtGameTutorial/security
Insights https://github.com/MeLikeyCode/QtGameTutorial/pulse
tutorial6: when and why do I have to add *parent as a class parameter and when not?https://github.com/MeLikeyCode/QtGameTutorial/issues/5#top
https://github.com/dsyleixa
dsyleixahttps://github.com/dsyleixa
on Jul 9, 2023https://github.com/MeLikeyCode/QtGameTutorial/issues/5#issue-1795394126
https://github.com/MeLikeyCode/QtGameTutorial/tree/master/tutorial6https://github.com/MeLikeyCode/QtGameTutorial/tree/master/tutorial6
https://github.com/MeLikeyCode/QtGameTutorial/tree/master/tutorial1https://github.com/MeLikeyCode/QtGameTutorial/tree/master/tutorial1
https://github.com/MeLikeyCode/QtGameTutorial/tree/master/tutorial5https://github.com/MeLikeyCode/QtGameTutorial/tree/master/tutorial5
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.