Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.3k Topics 455.6k Posts
  • QListStringModel setData not set data

    Solved
    5
    0 Votes
    5 Posts
    1k Views
    A
    Yes, I not properly read documentation and really mess with indexes, thank you for the answer .
  • Qt Widget Application (Desktop) user authentication

    Solved
    3
    0 Votes
    3 Posts
    647 Views
    O
    great Thank You!
  • Qt creator project settings

    Unsolved
    6
    0 Votes
    6 Posts
    1k Views
    jsulmJ
    @vadim.savchuk Take a look at the links I posted. For example http://doc.qt.io/qt-5/qmake-advanced-usage.html could be helpful.
  • Help With QtConcurrent:mappedReduce, "no matching function call to 'mappedReduce(..."

    Unsolved
    3
    0 Votes
    3 Posts
    1k Views
    N
    @jsulm compiler output looks like this: ../NicksImageProcessor/mainwindow.cpp: In member function 'void MainWindow::runLinescanClicked()': ../NicksImageProcessor/mainwindow.cpp:79:132: error: no matching function for call to 'mappedReduced(QList<linescanData>&, linescanIntermediate (*)(const linescanData&), cv::Mat (*)(cv::Mat&, const linescanIntermediate&), QtConcurrent::ReduceOption)' QFuture<cv::Mat> final = QtConcurrent::mappedReduced(images, &linescanLoadAndPick, &linesToImage, QtConcurrent::UnorderedReduce); ^ In file included from C:/Qt/5.10.0/mingw53_32/include/QtConcurrent/QtConcurrentMap:1:0, from ../NicksImageProcessor/mainwindow.cpp:7: C:/Qt/5.10.0/mingw53_32/include/QtConcurrent/qtconcurrentmap.h:121:21: note: candidate: template<class ResultType, class Sequence, class MapFunctor, class ReduceFunctor> QFuture<T> QtConcurrent::mappedReduced(const Sequence&, MapFunctor, ReduceFunctor, QtConcurrent::ReduceOptions) QFuture<ResultType> mappedReduced(const Sequence &sequence, ^ C:/Qt/5.10.0/mingw53_32/include/QtConcurrent/qtconcurrentmap.h:121:21: note: template argument deduction/substitution failed: ../NicksImageProcessor/mainwindow.cpp:79:132: note: couldn't deduce template parameter 'ResultType' QFuture<cv::Mat> final = QtConcurrent::mappedReduced(images, &linescanLoadAndPick, &linesToImage, QtConcurrent::UnorderedReduce); ^ In file included from C:/Qt/5.10.0/mingw53_32/include/QtConcurrent/QtConcurrentMap:1:0, from ../NicksImageProcessor/mainwindow.cpp:7: C:/Qt/5.10.0/mingw53_32/include/QtConcurrent/qtconcurrentmap.h:134:74: note: candidate: template<class Sequence, class MapFunctor, class ReduceFunctor> QFuture<typename QtPrivate::ReduceResultType<ReduceFunctor>::ResultType> QtConcurrent::mappedReduced(const Sequence&, MapFunctor, ReduceFunctor, QtConcurrent::ReduceOptions) QFuture<typename QtPrivate::ReduceResultType<ReduceFunctor>::ResultType> mappedReduced(const Sequence &sequence, ^ C:/Qt/5.10.0/mingw53_32/include/QtConcurrent/qtconcurrentmap.h:134:74: note: template argument deduction/substitution failed: C:/Qt/5.10.0/mingw53_32/include/QtConcurrent/qtconcurrentmap.h: In substitution of 'template<class Sequence, class MapFunctor, class ReduceFunctor> QFuture<typename QtPrivate::ReduceResultType<ReduceFunctor>::ResultType> QtConcurrent::mappedReduced(const Sequence&, MapFunctor, ReduceFunctor, QtConcurrent::ReduceOptions) [with Sequence = QList<linescanData>; MapFunctor = linescanIntermediate (*)(const linescanData&); ReduceFunctor = cv::Mat (*)(cv::Mat&, const linescanIntermediate&)]': ../NicksImageProcessor/mainwindow.cpp:79:132: required from here C:/Qt/5.10.0/mingw53_32/include/QtConcurrent/qtconcurrentmap.h:134:74: error: invalid use of incomplete type 'struct QtPrivate::ReduceResultType<cv::Mat (*)(cv::Mat&, const linescanIntermediate&)>' In file included from C:/Qt/5.10.0/mingw53_32/include/QtConcurrent/qtconcurrentmap.h:49:0, from C:/Qt/5.10.0/mingw53_32/include/QtConcurrent/QtConcurrentMap:1, from ../NicksImageProcessor/mainwindow.cpp:7: C:/Qt/5.10.0/mingw53_32/include/QtConcurrent/qtconcurrentfunctionwrappers.h:246:8: note: declaration of 'struct QtPrivate::ReduceResultType<cv::Mat (*)(cv::Mat&, const linescanIntermediate&)>' struct ReduceResultType; ^ In file included from C:/Qt/5.10.0/mingw53_32/include/QtConcurrent/QtConcurrentMap:1:0, from ../NicksImageProcessor/mainwindow.cpp:7: C:/Qt/5.10.0/mingw53_32/include/QtConcurrent/qtconcurrentmap.h:148:21: note: candidate: template<class ResultType, class Iterator, class MapFunctor, class ReduceFunctor> QFuture<T> QtConcurrent::mappedReduced(Iterator, Iterator, MapFunctor, ReduceFunctor, QtConcurrent::ReduceOptions) QFuture<ResultType> mappedReduced(Iterator begin, ^ C:/Qt/5.10.0/mingw53_32/include/QtConcurrent/qtconcurrentmap.h:148:21: note: template argument deduction/substitution failed: ../NicksImageProcessor/mainwindow.cpp:79:132: note: deduced conflicting types for parameter 'Iterator' ('QList<linescanData>' and 'linescanIntermediate (*)(const linescanData&)') QFuture<cv::Mat> final = QtConcurrent::mappedReduced(images, &linescanLoadAndPick, &linesToImage, QtConcurrent::UnorderedReduce); ^ In file included from C:/Qt/5.10.0/mingw53_32/include/QtConcurrent/QtConcurrentMap:1:0, from ../NicksImageProcessor/mainwindow.cpp:7: C:/Qt/5.10.0/mingw53_32/include/QtConcurrent/qtconcurrentmap.h:162:74: note: candidate: template<class Iterator, class MapFunctor, class ReduceFunctor> QFuture<typename QtPrivate::ReduceResultType<ReduceFunctor>::ResultType> QtConcurrent::mappedReduced(Iterator, Iterator, MapFunctor, ReduceFunctor, QtConcurrent::ReduceOptions) QFuture<typename QtPrivate::ReduceResultType<ReduceFunctor>::ResultType> mappedReduced(Iterator begin, ^ C:/Qt/5.10.0/mingw53_32/include/QtConcurrent/qtconcurrentmap.h:162:74: note: template argument deduction/substitution failed: ../NicksImageProcessor/mainwindow.cpp:79:132: note: deduced conflicting types for parameter 'Iterator' ('QList<linescanData>' and 'linescanIntermediate (*)(const linescanData&)') QFuture<cv::Mat> final = QtConcurrent::mappedReduced(images, &linescanLoadAndPick, &linesToImage, QtConcurrent::UnorderedReduce); ^ Makefile.Debug:609: recipe for target 'debug/mainwindow.o' failed mingw32-make[1]: Leaving directory 'C:/Users/elp14nab/Documents/Qt/build-NicksImageProcessor-Desktop_Qt_5_10_0_MinGW_32bit-Debug' mingw32-make[1]: *** [debug/mainwindow.o] Error 1 Makefile:36: recipe for target 'debug' failed mingw32-make: *** [debug] Error 2
  • QProcess not accepting arguments in MacOS (works in Windows)

    Solved
    9
    0 Votes
    9 Posts
    2k Views
    R
    @Rory_1 Update: I have partially solved my problem by resetting permissions on my macbook. diskutil resetUserPermissions / `id -u` The code now works consistently for all applications, including adobe Bridge, except photoshop. I assumed (bad plan) that photoshop accepted command line arguments (and it does in windows) but might not in MacOS. I do not believe the remaining issues are related to QProcess so I am marking this as solved. Thanks to @SGaist, @mpergand and @mrjj for your assistance!
  • How can I select a child node in a QTreeView?

    Unsolved
    4
    0 Votes
    4 Posts
    3k Views
    N
    Thx, That's it!!!
  • QtCreator Cmake C++17 Features

    Unsolved
    3
    0 Votes
    3 Posts
    2k Views
    SGaistS
    Hi, Since Qt 5.7, C++11 being mandatory this CONFIG line is not necessary anymore unless you are targeting older versions of Qt. You can however ask for a more recent version of the standard with c++14 and c++17. Did you setup your cmake project to use c++17 ? If so, how did you do it ? What version of Qt Creator are you using ?
  • run fortune Client Example on Amazon AWS Server

    Unsolved qtcpserver qtcpsocket server server - client
    2
    0 Votes
    2 Posts
    1k Views
    Pablo J. RoginaP
    @Allerknappe should your question better suited for AWS support team? or cloud forum? It seems not related to Qt itself. Anyway, from little experience with a (non Qt) REST server running in AWS, in that case the server was configured with "internal" IP and then the AWS security team forwarded the proper port(s) so the solution could be available from outside.
  • Alpha channel not written to bmp by QImage::save?

    Solved qimage bmp
    9
    0 Votes
    9 Posts
    5k Views
    raven-worxR
    @shwoods said in Alpha channel not written to bmp by QImage::save?: Did you ever get feedback on this? no, since i never asked anyone :) You can ask on the Qt mailing-list if you like.
  • How to set QSlider::handle to round ?

    Unsolved
    3
    0 Votes
    3 Posts
    9k Views
    Vinod KuntojiV
    @sonichy, Just adjust width and radius of slider handle width 11px; radius:5px;
  • 0 Votes
    2 Posts
    1k Views
    raven-worxR
    @Piyush Simply connect to the appropriate signals of your table widget: QTableView::doubleClicked(QModelIndex) QTableWIdget::cellDoubleClicked(int row, int column) QTableWidget::itemDoubleClicked(QTableWidgetItem*) And open up a new QTableWidget in the slot: QTableWidget* t = new QTableWidget( parent ); t->setWindowFlags( Qt::Window ); t->setAttribute( Qt::WA_DeleteOnClose ); // initialize table widget t->show();
  • This topic is deleted!

    Solved
    6
    0 Votes
    6 Posts
    25 Views
  • How to remove blue focus rectangle?

    Solved
    10
    0 Votes
    10 Posts
    6k Views
    MufanM
    Yeah, guys! Qt::WA_MacShowFocusRect works. It's awesome! Thank you a lot for your time and help! P.S. Style_tweaks didn't work for me. It called only PE_FrameLineEdit and PE_PanelLineEdit, instead of PE_FrameFocusRect. Maybe I should set on some other flags and settings for that, I don't know...
  • Forward declaration of QExplicitlySharedDataPointer<T>

    Unsolved
    2
    0 Votes
    2 Posts
    567 Views
    raven-worxR
    @linolium said in Forward declaration of QExplicitlySharedDataPointer<T>: So my question is whether it is possible to forward declare a class that uses QExplicitlySharedDataPointer<T> and how? Forward declaration of templated classes: template <class T> QExplicitlySharedDataPointer;
  • 0 Votes
    10 Posts
    3k Views
    M
    @jsulm : Thanks for your answers. I found the solution. I had a typing error when indicating the LD_LIBRARY_PATH in the Run Environment. I corrected the path for LD_LIBRARY_PATH and now my application is running on the target system.
  • Put a QLabel on anothers QLabels

    Unsolved
    2
    0 Votes
    2 Posts
    409 Views
    raven-worxR
    @ivanicy does it really have to be a composition of labels? Depending on your requirements it would be easier (at least less code) if you just do the painting (on a custom QFrame widget): void MyFrame::paintEvent( QPaintEvnet* event ) { QFrame::paintEvent( event ); QPainter p(this); p.setRenderHints( QPainter::TextAntialiasing | QPainter::Antialiasing ); const int sectionWidth = this->contentsRect().width() / 7; const int sectionHeight = this->contentsRect().height(); // draw color rects p.setBrush( Qt::yellow ); p.drawRect( 0 * sectionWidth , 0 , sectionWidth, sectionHeight ); p.setBrush( Qt::blue ); p.drawRect( 1 * sectionWidth , 0 , sectionWidth, sectionHeight ); p.setBrush( Qt::green ); p.drawRect( 2 * sectionWidth , 0 , sectionWidth, sectionHeight ); ..... // draw text p.setFont( ... ); p.setPen( Qt::white ); p.drawText( this->contentsRect(), Qt::AlignCenter, "LabelText" ); }
  • Blinking in the form of circle at the head as graph proceeds

    Unsolved
    1
    0 Votes
    1 Posts
    276 Views
    No one has replied
  • 0 Votes
    2 Posts
    438 Views
    J
    Answer at https://stackoverflow.com/a/48491350/1017348. The documentation of QLoggingCategory has a wrong separator character (https://bugreports.qt.io/browse/QTBUG-66050) and is insufficient (https://bugreports.qt.io/browse/QTBUG-66051).
  • Shared Lib link statically to QT lib

    Unsolved
    2
    0 Votes
    2 Posts
    345 Views
    SGaistS
    Hi, What error are you getting ?
  • QLineEdit cursor issue

    Solved
    6
    0 Votes
    6 Posts
    1k Views
    U
    @Cobra91151 you can use a validator instead of a mask