Git Product home page Git Product logo

Comments (6)

Taiko2k avatar Taiko2k commented on August 17, 2024

Just run that code when you want to show the about window, plus add the line dialog.set_visible(True). (Ive updated to code snippet in the tutorial with this)

from gtk4pythontutorial.

MadameMalady avatar MadameMalady commented on August 17, 2024

Okay, maybe I'm being thick, but this is what I did (see attached) : and it didn't work, also getting errors abt an unprintable character x.x

I'm still learning python and app development, sorry if this is obvious
I want Show_About to pull up the libadwaita about window

Screenshot from 2023-07-25 11-47-57
Screenshot from 2023-07-25 11-48-48

from gtk4pythontutorial.

Taiko2k avatar Taiko2k commented on August 17, 2024

Oh right, so the 2nd adw code block is supposed to replace the first. That might not have been clear. So remove everything that starts with self.about.

Btw one being assigned to self.about and the other dialog, the difference doesn't really matter since that object isn't going to be used again, I just should have been more consistent.

As for that invalid character, not sure why that's there, it seems to be a special kind of space, so maybe delete and retype the spaces in lines where you get that error.

from gtk4pythontutorial.

MadameMalady avatar MadameMalady commented on August 17, 2024

I removed everything that started with self.about, and re-did those spaces manually, I now get a different issue abt mismatched indentation:

Screenshot from 2023-07-26 14-32-59
Screenshot from 2023-07-26 14-33-30

from gtk4pythontutorial.

Taiko2k avatar Taiko2k commented on August 17, 2024

It seems like something has gone weird with a copy and paste you did. I'd suggest erasing that whole code block and writing it out manually. You can omit the informational dialog.set_* lines for the purposes of testing.

from gtk4pythontutorial.

MadameMalady avatar MadameMalady commented on August 17, 2024

I re-wrote the lines

    dialog = Adw.AboutWindow(transient_for=app.get_active_window())
    dialog.set_visable(True)

into the definition for Show_About, and I now get:

AttributeError: 'gi.repository.Adw' object has no attribute 'AboutWindow'

Is it possible that some syntax was updated?
I think I'll stick with the gdk about window for now, the adwaita one is pretty but I'm struggling a lot to get it working, thanks for trying to help, and for writing these tutorials at all, there's not a lot of resources for ppl trying to learn to make gnome apps yet.

from gtk4pythontutorial.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.