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. Runtime Error on 32bits...
Forum Updated to NodeBB v4.3 + New Features

Runtime Error on 32bits...

Scheduled Pinned Locked Moved General and Desktop
12 Posts 3 Posters 3.8k 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
    dcbasso
    wrote on last edited by
    #2

    This prolem occours when I run with Root!

    If I use the sudo ./MyApplication, this error appears to me:

    @
    WARNING: Phonon needs QCoreApplication::applicationName to be set to export audio output names through the DBUS interface
    @

    I don't use any kind od "audio"... not in my code!

    1 Reply Last reply
    0
    • G Offline
      G Offline
      guziemic
      wrote on last edited by
      #3

      With high probability it is used by WebKit to handle audio or video tags in HTML5. If you set application name does this problem ends?

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dcbasso
        wrote on last edited by
        #4

        How to set "application name"?

        1 Reply Last reply
        0
        • K Offline
          K Offline
          KA51O
          wrote on last edited by
          #5

          the "documentation":http://qt-project.org/doc/qt-4.8/qcoreapplication.html#applicationName-prop is your friend, use it.

          1 Reply Last reply
          0
          • D Offline
            D Offline
            dcbasso
            wrote on last edited by
            #6

            Nothing change...
            The error still there!

            1 Reply Last reply
            0
            • K Offline
              K Offline
              KA51O
              wrote on last edited by
              #7

              What exactly did you change in your code and what is the resulting error. You have to tell and do a little more if you want people to help you.

              1 Reply Last reply
              0
              • D Offline
                D Offline
                dcbasso
                wrote on last edited by
                #8

                KA510... I don't change anything between Compilations...
                The problems is all showed above, the errors still the same!

                I change the main.cpp, now is:

                @
                int main(int argc, char *argv[])
                {
                QApplication a(argc, argv);
                a.setApplicationName( "Balança Embarcada Veicular - Sistema Assistência Técnica" );
                a.setApplicationVersion( "1.0" );
                a.setOrganizationDomain( "none" );
                a.setOrganizationName( "Inove Tecnologia" );
                setlocale( QApplication::UnicodeUTF8, "C" );
                MainWindow w;
                w.show();
                return a.exec();
                }
                @

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  dcbasso
                  wrote on last edited by
                  #9

                  The source code of screen that shows the error on 32bits:

                  UI:
                  @
                  <?xml version="1.0" encoding="UTF-8"?>
                  <ui version="4.0">
                  <class>WidgetSVG</class>
                  <widget class="QWidget" name="WidgetSVG">
                  <property name="geometry">
                  <rect>
                  <x>0</x>
                  <y>0</y>
                  <width>400</width>
                  <height>300</height>
                  </rect>
                  </property>
                  <property name="minimumSize">
                  <size>
                  <width>400</width>
                  <height>300</height>
                  </size>
                  </property>
                  <property name="windowTitle">
                  <string>Form</string>
                  </property>
                  <property name="styleSheet">
                  <string notr="true">background-color: rgb(145, 145, 145)</string>
                  </property>
                  <layout class="QHBoxLayout" name="horizontalLayout">
                  <property name="spacing">
                  <number>5</number>
                  </property>
                  <property name="margin">
                  <number>5</number>
                  </property>
                  <item>
                  <widget class="QWebView" name="webView">
                  <property name="autoFillBackground">
                  <bool>false</bool>
                  </property>
                  <property name="url">
                  <url>
                  <string>about:blank</string>
                  </url>
                  </property>
                  </widget>
                  </item>
                  <item>
                  <widget class="QGroupBox" name="groupBox">
                  <property name="font">
                  <font>
                  <weight>75</weight>
                  <bold>true</bold>
                  </font>
                  </property>
                  <property name="title">
                  <string>Detalhes:</string>
                  </property>
                  <property name="alignment">
                  <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
                  </property>
                  <property name="flat">
                  <bool>true</bool>
                  </property>
                  <layout class="QVBoxLayout" name="verticalLayout_2">
                  <property name="spacing">
                  <number>3</number>
                  </property>
                  <property name="margin">
                  <number>5</number>
                  </property>
                  <item>
                  <widget class="QLabel" name="lbClasse">
                  <property name="text">
                  <string>Classe:</string>
                  </property>
                  </widget>
                  </item>
                  <item>
                  <widget class="QLabel" name="lbCodigo">
                  <property name="text">
                  <string>Código:</string>
                  </property>
                  </widget>
                  </item>
                  <item>
                  <widget class="QLabel" name="lbGrupo">
                  <property name="text">
                  <string>Grupo:</string>
                  </property>
                  </widget>
                  </item>
                  <item>
                  <widget class="QLabel" name="lbNumeroEixos">
                  <property name="text">
                  <string>Número de Eixos:</string>
                  </property>
                  </widget>
                  </item>
                  <item>
                  <widget class="QLabel" name="lbCargaMaxima">
                  <property name="text">
                  <string>Carga Máx.:</string>
                  </property>
                  </widget>
                  </item>
                  <item>
                  <spacer name="verticalSpacer">
                  <property name="orientation">
                  <enum>Qt::Vertical</enum>
                  </property>
                  <property name="sizeHint" stdset="0">
                  <size>
                  <width>20</width>
                  <height>40</height>
                  </size>
                  </property>
                  </spacer>
                  </item>
                  <item>
                  <widget class="QPushButton" name="btSelecionar">
                  <property name="text">
                  <string>Selecionar Veículo</string>
                  </property>
                  </widget>
                  </item>
                  </layout>
                  </widget>
                  </item>
                  </layout>
                  </widget>
                  <customwidgets>
                  <customwidget>
                  <class>QWebView</class>
                  <extends>QWidget</extends>
                  <header>QtWebKit/QWebView</header>
                  </customwidget>
                  </customwidgets>
                  <resources/>
                  <connections/>
                  </ui>
                  @

                  1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    dcbasso
                    wrote on last edited by
                    #10

                    The source code of screen that shows the error on 32bits:

                    cpp
                    @
                    #include "widgetsvg.h"
                    #include "ui_widgetsvg.h"

                    #include <QWebFrame>
                    #include "QtCore/QDebug"

                    WidgetSVG::WidgetSVG(QWidget *parent) :
                    QWidget(parent),
                    ui(new Ui::WidgetSVG)
                    {
                    ui->setupUi(this);
                    ui->webView->setContextMenuPolicy(Qt::CustomContextMenu);
                    ui->webView->setEnabled(false);
                    }
                    WidgetSVG::WidgetSVG(Veiculo *newVeiculo, QWidget *parent):
                    QWidget(parent),
                    ui(new Ui::WidgetSVG)
                    {
                    ui->setupUi(this);
                    ui->webView->setContextMenuPolicy(Qt::CustomContextMenu);
                    ui->webView->setEnabled(false);
                    setVeiculo( newVeiculo );
                    installEventFilter(this);
                    }
                    WidgetSVG::~WidgetSVG()
                    {
                    delete ui;
                    }
                    void WidgetSVG::setVeiculo(Veiculo newVeiculo)
                    {
                    this->veiculo = newVeiculo;
                    ui->webView->setUrl( getVeiculo()->getFileUrl() );
                    loadScreenData();
                    }
                    Veiculo
                    WidgetSVG::getVeiculo()
                    {
                    return this->veiculo;
                    }
                    void WidgetSVG::adjust()
                    {
                    QString url = ui->webView->url().toString().remove(0, 7);
                    renderer = new QSvgRenderer(url);
                    ui->webView->setZoomFactor( getFactor() );
                    }
                    void WidgetSVG::clicked(int codigo)
                    {
                    eixoSelecionado( codigo );
                    }
                    int WidgetSVG::getComponentWidth()
                    {
                    return ui->webView->size().width();
                    }
                    int WidgetSVG::getSVGWidth()
                    {
                    return renderer->defaultSize().width();
                    }
                    double WidgetSVG::getSVGRatio()
                    {
                    return (double) renderer->defaultSize().height() / renderer->defaultSize().width();
                    }
                    double WidgetSVG::getFactor()
                    {
                    return (double) getComponentWidth() / getSVGWidth();
                    }
                    void WidgetSVG::loadScreenData()
                    {
                    ui->lbClasse->setText( ui->lbClasse->text() + " " + getVeiculo()->getClasse() );
                    ui->lbCodigo->setText( ui->lbCodigo->text() + " " + QString::number(getVeiculo()->getCodigo()) );
                    ui->lbGrupo->setText( ui->lbGrupo->text() + " " + QString::number(getVeiculo()->getGrupo()) );
                    ui->lbNumeroEixos->setText( ui->lbNumeroEixos->text() + " " + QString::number(getVeiculo()->getNumeroEixos()) );
                    ui->lbCargaMaxima->setText( ui->lbCargaMaxima->text() + " " +QString::number(getVeiculo()->getPBT()) + " Ton." );
                    }
                    bool WidgetSVG::eventFilter(QObject *obj, QEvent *event)
                    {
                    bool retorno = false;
                    if (event->type() == QEvent::Resize)
                    {
                    adjust();
                    retorno = true;
                    } else {
                    ui->webView->page()->mainFrame()->addToJavaScriptWindowObject("sender", this);
                    retorno = QWidget::eventFilter(obj, event);
                    }
                    return retorno;
                    }

                    void WidgetSVG::on_btSelecionar_clicked()
                    {
                    emit veiculoSelecionado(getVeiculo());
                    emit selected();
                    this->setStyleSheet("background-color: rgb(138, 121, 35);");
                    ui->webView->setEnabled(true);
                    }
                    void WidgetSVG::setUnselected()
                    {
                    this->setStyleSheet("background-color: rgb(145, 145, 145);");
                    ui->webView->setEnabled(false);
                    }
                    @

                    1 Reply Last reply
                    0
                    • D Offline
                      D Offline
                      dcbasso
                      wrote on last edited by
                      #11

                      I try this too:

                      @
                      #include <QtGui/QApplication>
                      #include "QtCore/QtDebug"
                      #include "mainwindow.h"

                      int main(int argc, char *argv[])
                      {
                      QString appName = "Balança Embarcada Veicular - Sistema Assistência Técnica";
                      QString appVersion = "1.0";
                      QString orgName = "Inove Tecnologia";
                      QString orgDomain = "http://inovetecnologia.com.br/";
                      QApplication::setApplicationName( appName );
                      QApplication::setApplicationVersion( appVersion );
                      QApplication::setOrganizationName( orgName );
                      QApplication::setOrganizationDomain( orgDomain );
                      QCoreApplication::setApplicationName( appName );
                      QCoreApplication::setApplicationVersion( appVersion );
                      QCoreApplication::setOrganizationDomain( orgDomain );
                      QCoreApplication::setOrganizationName( orgName );
                      QApplication a(argc, argv);
                      a.setApplicationName( appName );
                      a.setApplicationVersion( appVersion );
                      a.setOrganizationDomain( orgDomain );
                      a.setOrganizationName( orgName );
                      setlocale( QApplication::UnicodeUTF8, "C" );
                      MainWindow w;
                      w.show();
                      return a.exec();
                      }
                      @

                      Still got problems...
                      This problems could be from lib's?
                      The 64bits I using OpenSuse to Compile, And 32bits I'm using Ubuntu 32bits (VMware)!

                      1 Reply Last reply
                      0
                      • D Offline
                        D Offline
                        dcbasso
                        wrote on last edited by
                        #12

                        Well, I install OpenSuse 32bits (with KDE)
                        Install QT, Compile on then and run...
                        The errors appears, but the application works as needed:

                        @
                        klauncher(26995) kdemain: No DBUS session-bus found. Check if you have started the DBUS server.
                        kdeinit4: Communication error with launcher. Exiting!
                        Balança Embarcada Veicular - Sistema Assistência Técnica(26948): No ksycoca4 database available!

                        Balança Embarcada Veicular - Sistema Assistência Técnica(26948)/kdecore (trader) KServiceTypeTrader::defaultOffers: KServiceTypeTrader: serviceType "PhononBackend" not found
                        @

                        Appears to be something with Ubuntu or maybe the gnome 32bits.

                        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