Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Icon sourceName does not work if application run via QGuiApplication
Forum Updated to NodeBB v4.3 + New Features

Icon sourceName does not work if application run via QGuiApplication

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 584 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
    DimanNe
    wrote on 23 Feb 2014, 17:21 last edited by
    #1

    Suppose I wrote this piece of qml code:
    @
    ApplicationWindow {
    visible: true
    ToolButton {
    action: Action {
    id: boldAction
    checkable: true
    iconName: "format-text-bold"
    //iconSource: "textbold.png"
    }
    }
    }
    @

    Now, if in main.cpp I will use
    @QGuiApplication a(argc, argv);@

    (which is from qml module of Qt), then there will not be icon in toolbutton.

    But if I replace above "QGuiApplication a(argc, argv);" by
    @
    QApplication a(argc, argv);
    @

    (which is from old widgets module of Qt), all works perfectly.

    So, my question is - is it a bug, or intended behaviour?
    If it is intended then why QApplication is in widgets module of Qt?
    And must I still use widgets module (and classes from its module) for properly working qml?

    Here is "minimal example":https://drive.google.com/file/d/0B4r5nJvpzEHGaklkUTJMM1Fld0k/edit?usp=sharing

    1 Reply Last reply
    0

    1/1

    23 Feb 2014, 17:21

    • Login

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