Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. qt4.8
    Log in to post
    • All categories
    • C

      Unsolved Trying to link an external library with Qmake. Works with absolute path, but not with relative path.
      Tools • qt4.8 qmake • • Curtwagner1984

      10
      0
      Votes
      10
      Posts
      425
      Views

      C

      @SGaist Thank you! This is very helpful to know.

    • C

      Solved Trying to run a Qt 4.8 project in the new Qt Creator(6.0.2) and MinGw 7.3. Run Fails before reaching main().
      Tools • qt creator qt4.8 mingw • • Curtwagner1984

      9
      0
      Votes
      9
      Posts
      307
      Views

      C

      @Christian-Ehrlicher Thank you for clarifying!

    • G

      Unsolved Partial text selection in QTreeView
      General and Desktop • qtreeview qt4.8 selection • • Giert

      7
      0
      Votes
      7
      Posts
      366
      Views

      G

      @SGaist of course!

      This OP gave up, as I'm about to do

      while this discussion gave me hope of handling mouse events in the view myself

      This discussion didn't really go anywhere at all

    • Q

      Solved Using old QGLwidget from Qt 4.8.2
      General and Desktop • qtopengl qt4.8 qglwidget • • QttCoreTester

      11
      0
      Votes
      11
      Posts
      403
      Views

      Q

      The issue is no longer observed with the latest Intel graphics driver beta version(27.20.100.8581). Fixed in latest release version 27.20.100.8587

    • Matheus da Silva Ribeiro

      Solved Cross Swipe Screens
      QML and Qt Quick • qml gestures qt4.8 • • Matheus da Silva Ribeiro

      4
      0
      Votes
      4
      Posts
      185
      Views

      M

      @Matheus-da-Silva-Ribeiro Please mark your answer as "Correct Answer" to change title to "Solved".

    • A

      Solved can't find linker symbol for virtual table for 'QAbstractItemViewPrivate' value
      Mobile and Embedded • qt4.8 • • Andrea

      5
      0
      Votes
      5
      Posts
      2430
      Views

      A

      After some other tests, I think I've found which is the issue and how to solve it.

      Here a simplified snippet of my code, where there is a class Button used by a class Parent.
      When button is clicked, it could cause a panel change, or raise a message, or do some other actions (not detailed beause not relevant to the question).

      What I found is in slot onClicked of class Button: entering the first if, the program emits the signal request_GoToPrev, which cause the class Panel to delete current panel (and its childs, even compirsed the Button!) and raise a new one.
      But after emitting the signal and do all actions required, the program "comes back" to the point when it has emitted the signal and continue the instruction execution: when it reaches the second if it creashes because this is no more consistent.

      That's what it seems to be after my tests. Putting a return call just after the signal emission in the first if problem is solved.

      // HEADER: Button.h class Button : public QPushButton { Q_OBJECT public: Button( QWidget *parent = 0 ); ~Button(); signals: void request_GoToPrev(); //!< Go to previous panel void request_GoToNext( QString ); //!< Go to next panel void signal_Error( int ); //!< Error code private slots: void onClicked(); private: typ_Button_tags *widgetTags; //!< Pointer to the tags structure that defines the \ref Button widget typ_Shared *privateCtx; //!< Reference to runtime application structure }; // C: Button.cpp Button::Button( QWidget *parent ) : QPushButton(parent) { // Do some settings, like: font, stylesheet, focus, size.. } Button::~Button() { } void Button::onClicked() { // Callback to be called when button clicked if( !this->widgetTags->callbackClick.isEmpty() ) { emit this->request_GoToPrev(); /* !!! ATTENTION !!! * * Here the instruction return HAS to be written, otherwise the application crashes. * In fact, when running, the signal 'request_GoToPrev' is sent, but the flow of the * process should exit the call of this slot. * Doing that, 'this' is no more consistent after having emitted the signal, so the * application face a segmentation fault. */ return; } // Message box if( !this->widgetTags->msgText.isEmpty() ) { // Do some other actions on 'this'... } } // HEADER: Panel.h class Panel : public QMainWindow { Q_OBJECT public: Panel( QWidget *parent = 0 ); private slots: void on_GoToNext(int index); void on_GoToPrevious(); void on_Error(int errId); private: Button *Btn; }; // C: Panel.h Panel::Panel( QWidget *parent ) : QMainWindow(parent) { // Do some settings: font, stylesheet, focus, size... this->Btn = new Button( this ); connect( this->Btn, SIGNAL(request_GoToPrev()), this, SLOT(on_GoToPrevious()), Qt::UniqueConnection ); // Do some actions to layout the button inside the panel } void Panel::on_GoToPrevious() { // Do some check... delete this->Btn; // Do some actions... }
    • A

      Unsolved can hide widget emit signal
      Mobile and Embedded • qt4.8 signals emit • • Andrea

      6
      0
      Votes
      6
      Posts
      2623
      Views

      SGaist

      Hi,

      Out of curiosity, why do you want to "simulate" a button click ?

    • A

      Unsolved Terminate QThread correctly
      Mobile and Embedded • qthread qt4.8 yocto dizzy • • Andrea

      1
      0
      Votes
      1
      Posts
      478
      Views

      No one has replied

    • A

      Unsolved Terminate QThread correctly
      General and Desktop • thread qt4.8 yocto dizzy • • Andrea

      11
      0
      Votes
      11
      Posts
      14021
      Views

      Buckwheat

      Hi @Andrea

      WOW! Infinite loop to just sleep and process events. Why not just start a timer of PreciseTimer and allow the events to flow freely in the thread? Since you want it to run as fast as possible you can even set the timeout to 0 to run freely when there are no events.

      You can then look at thread->requestInterruption () and the thread will comply! Just make sure if you are doing something in a loop in the timer callback you check thread ()->isInterruptionRequested (). And best of all... NO CHECKING THE EVENT QUEUE!

      There is a nice writeup about proper thread use at: https://mayaposch.wordpress.com/2011/11/01/how-to-really-truly-use-qthreads-the-full-explanation/

      You are basically there with your code. Just the loop is wasteful.

    • M

      Unsolved segmentation fault triggered in QKeyMapper::changeKeyboard()
      General and Desktop • pyqt4 qt4.8 segfault • • Marc_Van_Daele

      3
      0
      Votes
      3
      Posts
      1070
      Views

      M

      In the PyQt 4.9.4 code downoaded from https://sourceforge.net/projects/pyqt/files/PyQt4/ I find
      (Note that we are using 4.9.3 but I couldn't find the sources of that version)

      void sipQLineEdit::changeEvent(QEvent *a0) { sip_gilstate_t sipGILState; PyObject *sipMeth; sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[14],sipPySelf,NULL,sipName_changeEvent); if (!sipMeth) { QLineEdit::changeEvent(a0); return; } typedef void (*sipVH_QtCore_17)(sip_gilstate_t,PyObject *,QEvent *); ((sipVH_QtCore_17)(sipModuleAPI_QtGui_QtCore->em_virthandlers[17]))(sipGILState,sipMeth,a0); }
    • S

      Unsolved libQgpsmm no such file or directory
      General and Desktop • qt4.8 armhf gpsd • • Simplexity

      4
      0
      Votes
      4
      Posts
      1619
      Views

      S

      @jsulm many thanks. Yes libgpsmm.h is ok, but the man page you pointed to also references libQgpsmm.

    • P

      Solved list-elemetns are not "paint"
      QML and Qt Quick • list qt4.8 • • petzold

      7
      0
      Votes
      7
      Posts
      1158
      Views

      P

      Hi Ray,

      thanks for that tip. Now i understood the way how it works.
      i already tried and it works.
      thanks both of you
      -> solved

    • D

      Unsolved Strategies for dealing with focus in qwidget project with custom input device
      Mobile and Embedded • focus qkeyevent qt4.8 • • dannas

      4
      0
      Votes
      4
      Posts
      2187
      Views

      SGaist

      The Keyboard Focus in Widgets chapter from Qt's documentation already give some hints on how to handle that.

      If you build your focus chain properly you can then use nextInFocusChain and previousInFocusChain to avoid hardcoding stuff.

    • B

      Unsolved Problem with pressing TAB key during QTableView cell edit
      General and Desktop • qt4.8 qtableview qitemdelegate editor tab • • Ben35

      4
      0
      Votes
      4
      Posts
      4157
      Views

      B

      I think i've found a solution.

      First, i install an eventFilter in my custom editor widget B on the internal spinbox :

      internalSpinbox->installEventFilter(this);

      Then, i implement eventFilter to treat the events on the spinbox and duplicate them to the parent:

      bool AbstractRatioQuantitySpinbox::eventFilter(QObject *object, QEvent *event) { // cf http://stackoverflow.com/questions/12145522/why-pressing-of-tab-key-emits-only-qeventshortcutoverride-event if (event->type() == QEvent::KeyPress) { auto keyEvent = static_cast<QKeyEvent *>(event); if (keyEvent->key() == Qt::Key_Tab || keyEvent->key() == Qt::Key_Backtab) { QApplication::postEvent( this, new QKeyEvent(keyEvent->type(), keyEvent->key(), keyEvent->modifiers())); return true; } } else if (event->type() == QEvent::FocusOut) { auto focusEvent = static_cast<QFocusEvent *>(event); QApplication::postEvent(this, new QFocusEvent(focusEvent->type(), focusEvent->reason())); return false; } return QWidget::eventFilter(object, event); }
    • T

      Unsolved QT 4.8 and network SSIDs
      Mobile and Embedded • qt4.8 wifi connection networking • • timroberts

      4
      0
      Votes
      4
      Posts
      1715
      Views

      SGaist

      Maybe QNetworkConfigurationManager and friend classes might be of help here.

    • P

      Unsolved Linux (Ubuntu, Ubuntu Mate, Raspbian, ..) doesn't recognize enter-Event for On-Screen-Keyboard
      General and Desktop • linux qt4.8 qt5.5.1 touch universal acces • • Pixtar

      1
      0
      Votes
      1
      Posts
      796
      Views

      No one has replied

    • Y

      Unsolved Adding signal on table items
      General and Desktop • qt4.8 qtablewidget pyqt4 • • yvesm

      3
      0
      Votes
      3
      Posts
      1742
      Views

      Y

      Thanx bsomervi. Good point. I could go with an even more general signal (like itemClicked) but finding the signal that will more rightly pick only a checkbox checked/unchecked action would be optimal.

    • A

      Unsolved Import from Odt
      General and Desktop • qt4.8 qtextdocument qt5 • • alan73

      3
      0
      Votes
      3
      Posts
      1304
      Views

      P

      Odt import file is very easy...

      OOReader.h is my work, is a subset from Okular KDE ...
      https://github.com/pehohlva/fop-miniscribus/blob/master/OO_Widged/oasis/OOReader.h
      2017 the best way is now textutil from mac it convert doc rtf docx odt and many other format to txt or html to play in QTextedit ...

      void ZipDoc::handler_txtutils( const QString file ) { qDebug() << "### handler use-> " << __FUNCTION__; //// converter = /usr/bin/textutil if (converter.size() < 4) { text_s = QString("textutil -convert .. unable to read! or not mac osx."); } //// ram->LoadFile(file); //// const QByteArray base = ram->stream(); QTime myTimer; myTimer.start(); QProcess *process = new QProcess(NULL); process->setReadChannelMode(QProcess::MergedChannels); process->start(converter, QStringList() << "-convert" << "txt" << file << "-stdout", QIODevice::ReadOnly ); if (!process->waitForFinished()) { text_s = QString("Unable to read!."); } else { text_s = strip_tag(process->readAll()); } qDebug() << "### handler_txtutils time-> " << myTimer.elapsed(); }
    • N

      Unsolved error while loading shared libraries: libQtWebview.so.1: cannot open shared object file: No such file or directory
      General and Desktop • qt4.8 qserialport binary • • Narthan

      3
      0
      Votes
      3
      Posts
      2296
      Views

      N

      Ok, even i tried copying by libraries to the deploying system, and exported it , then binary will execute, but serial port will not work as in the code.,

    • A

      unable to get colored image using v4l2 and qt+qml onClicked
      Mobile and Embedded • qt4.8 v4l2 colored image • • Anas_Deshmukh

      4
      0
      Votes
      4
      Posts
      2066
      Views

      V

      There already a camera application(qtcam) integrated qtquick and v4l2, please try clone the source from the below link,
      https://github.com/econsysqtcam/qtcam.git
      Application available in launchpad also for ubuntu 12.04 & 14.04