Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Icons look different in QtDesigner preview VS running generated python script
Forum Updated to NodeBB v4.3 + New Features

Icons look different in QtDesigner preview VS running generated python script

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 445 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DanilZ
    wrote on 8 Jul 2022, 07:59 last edited by
    #1

    Hi All,

    I have created an interface that looks great in the Qt Designer preview, but when saving the .ui file and converting it to .py file my icons loose sharpness.

    QT Designer preview:
    Screenshot 2022-07-08 at 10.54.26.jpg

    main.py results:
    Screenshot 2022-07-08 at 10.54.55.jpg

    I have no idea what is happening.

    Here is my full pipeline:

    1. Create .ui file in QT Designer
    2. Convert it to python: $ pyuic6 -x main_window.ui -o main_window.py
    3. Convert resources.qrc to python $ pyside6-rcc resources.qrc -o resources.py
    4. Add
    import resources
    

    to my main_window.py
    5. Run program

    I am using PyQt6, not PySide6

    Can anyone advice

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 8 Jul 2022, 18:55 last edited by
      #2

      Hi,

      Which version of PyQt 6 are you using ?
      Which format are you using for your icons ?
      On which OS ?
      How did you install PyQt6 ?
      Is Designer the one from you got with PyQt6 ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • D Offline
        D Offline
        DanilZ
        wrote on 11 Jul 2022, 08:24 last edited by
        #3
        1. PyQt6 version:
          Screenshot 2022-07-11 at 11.22.11.jpg

        2. Icons format SVG. Here is an example code of one of them:
          <svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 24 24" fill="none" stroke="#8f93a9" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-activity"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline></svg>

        3. MacOS Monterey 12.4

        4. I installed PyQt6 via pip install

        5. Designer was obtained via installing the pyqt5-tools

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 17 Jul 2022, 16:21 last edited by
          #4

          Can you provide a minimal script + svg that shows the behaviour ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          1/4

          8 Jul 2022, 07:59

          • Login

          • Login or register to search.
          1 out of 4
          • First post
            1/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved