I keep getting errors
-
wrote on 23 Jan 2025, 02:44 last edited by Mahdir2111
I keep getting these error:
"reference to type 'const QString' could not bind to an lvalue of type 'int'."
Is there anything wrong with my code:
int randomnum = rand() % 101; ui->output->setText(randomnum);
-
-
wrote on 23 Jan 2025, 05:57 last edited by Grit Clef
You shouldn't use an 'int' as the argument of 'setText'. Instead, you should use
ui->output->setText(QString::number(randomnum));
-
You shouldn't use an 'int' as the argument of 'setText'. Instead, you should use
ui->output->setText(QString::number(randomnum));
wrote on 23 Jan 2025, 21:39 last edited by Mahdir2111@Grit-Clef I still get the same error, Here's my code:
int randomnum = rand() % 101; ui->output->setText(QString::number(randomnum));
-
@Grit-Clef I still get the same error, Here's my code:
int randomnum = rand() % 101; ui->output->setText(QString::number(randomnum));
-
wrote on 24 Jan 2025, 05:24 last edited byThis post is deleted!
-
@ellen What are you talking about? Your post is not related to the topic of this thread.
-
wrote on 26 Jan 2025, 00:03 last edited by
also a get a error when running a app with pyside6:
Fatal Python error: init_import_site: Failed to import the site module Python runtime state: initialized Traceback (most recent call last): File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/site.py", line 621, in <module> main() File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/site.py", line 604, in main known_paths = venv(known_paths) File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/site.py", line 522, in venv with open(virtual_conf, encoding='utf-8') as f: PermissionError: [Errno 1] Operation not permitted: '/Users/a-user/Documents/Qt/Mathcalcpy/.qtcreator/Python_3_9_6venv/pyvenv.cfg'
-
also a get a error when running a app with pyside6:
Fatal Python error: init_import_site: Failed to import the site module Python runtime state: initialized Traceback (most recent call last): File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/site.py", line 621, in <module> main() File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/site.py", line 604, in main known_paths = venv(known_paths) File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/site.py", line 522, in venv with open(virtual_conf, encoding='utf-8') as f: PermissionError: [Errno 1] Operation not permitted: '/Users/a-user/Documents/Qt/Mathcalcpy/.qtcreator/Python_3_9_6venv/pyvenv.cfg'
wrote on 26 Jan 2025, 09:02 last edited by@Mahdir2111 said in I keep getting errors:
PermissionError: [Errno 1] Operation not permitted: '/Users/a-user/Documents/Qt/Mathcalcpy/.qtcreator/Python_3_9_6venv/pyvenv.cfg'
Start by verifying what the permissions, owner and group are on that file.
-
@Mahdir2111 said in I keep getting errors:
PermissionError: [Errno 1] Operation not permitted: '/Users/a-user/Documents/Qt/Mathcalcpy/.qtcreator/Python_3_9_6venv/pyvenv.cfg'
Start by verifying what the permissions, owner and group are on that file.
wrote on 26 Jan 2025, 14:53 last edited byhome = /Applications/Xcode.app/Contents/Developer/usr/bin include-system-site-packages = false version = 3.9.6
-
home = /Applications/Xcode.app/Contents/Developer/usr/bin include-system-site-packages = false version = 3.9.6
wrote on 26 Jan 2025, 14:58 last edited by@Mahdir2111 That doesn't address any of the questions. Up to you.
1/10