#๐ PySide6 QMainWindow doesn't show up?
44 messages ยท Page 1 of 1 (latest)
@viscid otter
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
@viscid otter I've recovered your message
Hi, lets start off by letting you know that I'm very new to Python.
I'm currently trying to make my little application to use QT with PySide6 instead of Tkinter, but I'm a bit confused about why the application window isn't showing up as it should but hovering over the app icon on the taskbar shows the UI (see screenshot).
I've googled a bit and there seems to be people with the same issue that got their stuff solved, but I'm not sure I quite understand the solutions popping up (maybe because I'm still not very experienced?)
So I figured I may as well see if there is any people on Discord that may be able to either explain or help!
I've done the basic design of the UI how I want it with QTDesigner.
I set up my py files like this for now
"main.py",
"window.py",
"window_ui.py",
"window.ui"
I've attached the files as well in case it would be helpful. (Ignore all the unnecessary imports, they'll be removed later)
But the basics of it is that launching the main.py script doesnt make the app window pop up as stated earlier.
Any help is appreciated, if more information is needed then tell me what you need and i'll try provide.
you can't share files here unfortunately
I'm not really familair with working with designer ui files unfortunately. Can you show what the UI looks like?
As a pyqt dev, I always recommend staying far away from designer
I see.
doing the ui to py conversion process just makes such an absolute mess of code
I know it's not really helpful advice in the moment, but I'd really recommend trying to code it from scratch
also on a related note, the very first thing I built in qt (it was with designer, haha) was a spritesheet creator
basically the opposite of what you have here
just thought that was funny
I can see why haha, no worries!
I'll keep waiting for some answers, if I don't get any within a day I'll just resort to spend a day learning how to do it from the ground up.
haha that's funny!
i was frustrated there was no batch extractor tool for it that worked well so i took matter into my own hands and wrote a simple script for it at first haha, then some wiki makers wanted it to have a gui and gif creation for their games.
one small thing to try that looks out of place
def main():
app = QApplication()
window = AppWindow()
window.show()
app.exec()
I haven't used PySide6 yet, but previous versions require an argument in QApplication
try putting an empty list there
app = QApplication([])
Ahh neat! Are you in game dev?
oh nevermind, only PyQt requires the list
PySide doesn't
Not exactly, I've worked on some fnf mods here and there for learning purposes, I like learning a bit about most things.
and yeah the list isnt required
MainWindow.setWindowOpacity(0.000000000000000)
this line caught my eye too
try commenting that out
oh wtf thats...
seems like you might be making an invisible window...
lol glad that was it!
Dug up my old sprite tool though for a laugh. Yours looks a lot better
haha thats kinda what my tkinter variant looks like
This was 5+ years ago though. I've come a long way since then ๐
I bet! Haha!
Thanks again, despite me being slightly embarrassed now, but hey sometimes you miss simple stuff due to sheer frustration!
Np! Glad it's all working now
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.
๐ PySide6 QMainWindow doesn't show up?