Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Cannot find libs for QPrinter and unicodeUTF8
QtWS25 Last Chance

Cannot find libs for QPrinter and unicodeUTF8

Scheduled Pinned Locked Moved Installation and Deployment
6 Posts 2 Posters 3.2k Views
  • 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.
  • W Offline
    W Offline
    willemf
    wrote on last edited by
    #1

    I am building C++ software from source on Fedora20. I have the following libraries:

    @ qt5-qtbase-devel qt5-qtdeclarative-devel qt5-qtscript-devel
    qt5-qtwebkit-devel qt5-qtsvg-devel qt5-qttools-devel
    @

    qmake appears to run ok:

    @[root@localhost subsurface]# qmake-qt5 --version
    QMake version 3.0
    Using Qt version 5.4.0 in /usr/lib64
    @

    I use qmake like this:
    @make-qt5
    @

    No errors displayed, I assume headers generated are ok.

    Upon make, the following Qt-related errors:

    @[root@localhost subsurface]# make
    @

    (1)

    @compiling main.cpp
    In file included from /usr/include/QtGui/QTextEdit:1:0,
    from .uic/ui_mainwindow.h:26,
    from qt-ui/mainwindow.h:14,
    from main.cpp:11:
    /usr/include/QtGui/qtextedit.h:235:16: error: ‘QPrinter’ has not been declared
    void print(QPrinter *printer) const;
    ^
    @

    (2)

    @In file included from qt-ui/tableview.h:10:0,
    from .uic/ui_diveplanner.h:26,
    from qt-ui/diveplanner.h:140,
    from .uic/ui_mainwindow.h:30,
    from qt-ui/mainwindow.h:14,
    from main.cpp:11:
    .uic/ui_tableview.h: In member function ‘void Ui_TableView::retranslateUi(QGroupBox*)’:
    .uic/ui_tableview.h:49:87: error: ‘UnicodeUTF8’ is not a member of ‘QApplication’
    TableView->setWindowTitle(QApplication::translate("TableView", "GroupBox", 0, QApplication::UnicodeUTF8));
    @

    I suspect I am missing one or two more Qt libraries.
    Any advice, please?
    Kind regards,
    willem

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Did you add

      @QT += printsupport@

      to your pro file ?

      On a side note, it's a very bad idea to develop as root, you can destroy your system any time without even noticing it.

      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
      • W Offline
        W Offline
        willemf
        wrote on last edited by
        #3

        Thanks very much for your response. The profile has:

        @QT_CONFIG -= no-pkg-config
        QT = core gui network svg
        lessThan(QT_MAJOR_VERSION, 5) {
        QT += webkit
        } else {
        QT += printsupport concurrent
        !android: QT += webkitwidgets webkit
        android: QT += androidextras
        }
        @

        For Fedora, which libraries contain QPrinter and unicodeUTF8 ??

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Wait, are you porting a Qt 4 application to Qt 5 ?

          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
          • W Offline
            W Offline
            willemf
            wrote on last edited by
            #5

            No, the code has already been ported, but I get a link error upon building the code. As you can see from the snippet, the initialisation is different for Qt5 as compared to older versions of Qt.

            In which Fedora Qt library file(s) does one find QPrinter and unicodeUFT8 ??

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              UnicodeUTF8 has been obsoleted in Qt 5

              QPrinter should be in gui for Qt 4 and printsupport for Qt 5

              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

              • Login

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