Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • QtConcurrent::run problem

    4
    0 Votes
    4 Posts
    2k Views
    SGaistS
    Don't create the QTableView in that function
  • Qt5: hideEvent not fired after showMinimized

    4
    0 Votes
    4 Posts
    1k Views
    SGaistS
    Then you should re-check if it's still the same with 5.4
  • [SOLVED] How to use main args

    7
    0 Votes
    7 Posts
    5k Views
    R
    I didnt want to modify them, just to use them :)
  • Mouse drag on specific area.

    5
    0 Votes
    5 Posts
    1k Views
    SGaistS
    Makes me think of "collidesWithPath":http://doc.qt.io/qt-5/qgraphicsitem.html#collidesWithPath Note that I haven't used it
  • How to use QWebElement?

    1
    0 Votes
    1 Posts
    460 Views
    No one has replied
  • Have no idea how to create multiple windows!

    3
    0 Votes
    3 Posts
    873 Views
    J
    [quote author="sierdzio" date="1419321382"]All you need to do to create a separate window in Qt is to create a QWidget (like QPushButton, QLabel, etc.) without a parent (meaning: parent == 0). Or, alternatively, you can use QDialog.[/quote] I personally do not know how to approach this? Here is the source code i have so far, were can i insert a QDialog: login_window.h @ #ifndef LOGIN_WINDOW_H #define LOGIN_WINDOW_H #include <QWidget> #include <vector> namespace Ui { class LoginWindow; } class LoginWindow : public QWidget { Q_OBJECT public: explicit LoginWindow(QWidget *parent = 0); ~LoginWindow(); bool checkStudentElement(int &refString, std::vector<int> &refVector); private slots: void on_loginButton_clicked(); private: Ui::LoginWindow *ui; std::vector<int> *studentIDList; }; #endif // LOGIN_WINDOW_H @ login_window.cpp @ #include "login_window.h" #include "ui_loginwindow.h" LoginWindow::LoginWindow(QWidget *parent) : QWidget(parent), ui(new Ui::LoginWindow) { ui->setupUi(this); } LoginWindow::~LoginWindow() { delete ui; } void LoginWindow::on_loginButton_clicked() { std::string student_ID = (ui->le_studentID->text()).toStdString(); //convert to string //Must then check if it is already in the system if(checkStudentElement(student_ID, studentIDList) == true) //need to run function for check { ui->loginStatus->setText("Login Successful"); break; }else{ ui->loginStatus->setText("Login Failed"); studentIDList->push_back(student_ID); //push the ID into the vector } } bool LoginWindow::checkStudentElement(int &refString, std::vector<int> &refVector) { int counter = refString.Length(); if(counter > refString) { } for(int i = 0; i <= refVector.size(); i++) { //Will loop thru the elements to check for similar vector if(/*refVector.()begin == refVector*/) { //if it contain it break; }else{ return false; } //else make sure to return that value } } @
  • Parser Xml with Root empty

    6
    0 Votes
    6 Posts
    1k Views
    J
    http://www.w3schools.com/xml/xml_validator.asp This shows your original XML is invalid. I don't think it is a bug.
  • 0 Votes
    18 Posts
    14k Views
    J
    I got the same problem. I solved it by using this invocation ordering: setAttributeArray(0,...); enableAttributeArray(0); glDrawArrays(); disableAttributeArray(0); It worked. I do this for every object I draw. Regards.
  • Exclude files with QFileInfoList filter

    2
    0 Votes
    2 Posts
    2k Views
    sierdzioS
    As the "documentation":http://doc.qt.io/qt-5/qdir.html#entryInfoList suggests: yes, you can filter the results as you wish. Example: @ QFileInfoList list = dir.entryInfoList("*.exe", QDir::NoDotAndDotDot | QDir::Files); // or just QFileInfoList list = dir.entryInfoList(QDir::NoDotAndDotDot | QDir::Files); @
  • DirectShowPlayerService::doSetUrlSource: Unresolved error code 800c0004

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • Multi-touch not working on Qt-5.x but works on Qt-4.8

    2
    0 Votes
    2 Posts
    891 Views
    P
    Deleted comment.
  • 0 Votes
    3 Posts
    1k Views
    N
    Hi, yes i include: @#include <QtNetwork>@ and when i click on the QNetworkProxy in the header declaration: @QNetworkProxy m_networkProxy;@ and press F1 qtcreator opens the correct QNetworkProxy documentation site. I also checked the Qt installation (5.4 final) and every thing seem ok. (headers are there for winrt platform). I didn't change anything in the Qt installation. Just installed it with online installer to standard localtion: C:\Qt BUT i first installed mingw Qt only and then later added Windows Runtime Qt by calling Maintanace Tool and installing it. yes my .pro file looks like this (it is a static lib) @ QT += core sql network gui widgets TARGET = libapp TEMPLATE = lib CONFIG += staticlib MOBILITY = systeminfo SOURCES += .... HEADERS += .... @ Really strange... When i compile it for MSVC 64 bit Desktop it compiles fine.. Only for Windows Runtime 64 i have this problem. Greetings Nando [quote author="SGaist" date="1419284692"]Hi, Maybe silly questions but: Are you including QNetworkProxy in Pilot.hpp ? Do you have QT += network in your pro file (IIRC it should be on by default unless you have a QT = somewhere) [/quote]
  • Qt how are alphanumeric strings sorted?

    2
    0 Votes
    2 Posts
    3k Views
    sierdzioS
    See this question on SO: "link":http://stackoverflow.com/questions/11933883/sort-filenames-naturally-with-qt. The answer seems to be to use QCollator class.
  • Errors compilng QT 4.8.4

    2
    0 Votes
    2 Posts
    594 Views
    sierdzioS
    Try with Qt 4.8.6. And take a look at "this":http://stackoverflow.com/questions/22539927/compiling-qt-5-2-1-for-win32-msvc-fails-due-to-linker-errors.
  • Process is starting but not running in SELinux-related command "aureport"

    1
    0 Votes
    1 Posts
    468 Views
    No one has replied
  • Convert file.ui > file.py run script but not go

    1
    0 Votes
    1 Posts
    538 Views
    No one has replied
  • Howto get system call output?

    2
    0 Votes
    2 Posts
    3k Views
    SGaistS
    Hi, Sounds like you are looking for "QProcess":http://doc.qt.io/qt-5/qprocess.html
  • 0 Votes
    5 Posts
    4k Views
    SGaistS
    Because a "pointer":http://www.cplusplus.com/doc/tutorial/pointers/ to an object is not the same as an object directly. However, there's still no reason to use pointers in your case.
  • One QGraphicsScene, two QGraphicsViews results in crash

    2
    0 Votes
    2 Posts
    630 Views
    SGaistS
    Hi, I know it may sound silly but just to rule out the obvious: did you properly initialize the secondary graphics view ? You should also add the OS as well as Qt version you are using
  • [SOLVED] QThread - Stopping a workerThread gracefully

    5
    0 Votes
    5 Posts
    2k Views
    M
    Good point, i'll modify the while loop and use a QTimer that fire each 100ms for example. Thanks!