Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • [SOLVED]set addresses in linux

    5
    0 Votes
    5 Posts
    3k Views
    F
    ifconfig is the widely adopted program to manage NICs. It can slightly change in its syntax, but that is the command to go if you need to be as much portable as possible. Other ways rely heavily on the distribution and will nullify the adoption of Qt as cross platform! By the way, while it is true that each distribution as its own way to set up addresses (text files, nm, scripts,...) each one must obey the ifconfig command.
  • Firefox Browser stuck when droping link to QMainWindow

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • I am unable to set path in QFileSystemModel

    4
    0 Votes
    4 Posts
    3k Views
    F
    I don't think the problem here is that the setRootPath does not change the view content, since the model is created from scratch....
  • Show/hide top-level submenu at runtime

    3
    0 Votes
    3 Posts
    4k Views
    L
    [quote author="Volker" date="1329084878"]the only way I see is to disable the menu item/action or remove it from the menu or menu bar.[/quote] Thanks, I'll try your method today.
  • Segmentation fault... [SOLVED]

    8
    0 Votes
    8 Posts
    7k Views
    K
    [quote author="Volker" date="1329072554"]The solution is at the top of the very first post - in case someone looks at the end of the thread for the solution :)[/quote] lol sorry for that ...next time I ll post at bottom
  • Speed of gif

    6
    0 Votes
    6 Posts
    3k Views
    K
    Hi i think im having some problems understanding how to use the threads to my benefit.... I`ve changed my main like this: @#include <QtGui/QApplication> #include <QObject> #include "waitthread.h" #include "loadthread.h" int main(int argc, char *argv[]) { QApplication a(argc, argv); QApplication::setStyle (new IconSize ()); LoadThread * load_thread = new LoadThread (); WaitThread * wait_thread = new WaitThread (); QObject::connect (load_thread, SIGNAL(load_finished()), wait_thread, SLOT(loading_finished())); load_thread->start (); wait_thread->start (); return a.exec &#40;&#41;; }@ the loadthread.cpp: @LoadThread::LoadThread() { mainWin = new MainWindow (); } void LoadThread::run (){ //--------------------do some stuff emit load_finished (); mainWin->show (); }@ And the waitThread.cpp @#include "waitthread.h" WaitThread::WaitThread() { loadwidg = new LoadingWidget (); loadwidg->show (); } void WaitThread::run (){ } void WaitThread::loading_finished (){ loadwidg->close (); delete loadwidg; this->terminate (); } @ Somehow..the mainWin doesnt show and the loadingwidget neither --------EDIT My bad loadingWidget is shown. ----EDIT 2 found my first mistake the mainWin must be shown in a different method otherwise the thread finishes when run finishes
  • Login code

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Displaying an image in a QGLWidget

    2
    0 Votes
    2 Posts
    2k Views
    J
    (bump) Still stuck and anxious for a solution.
  • How to use a special qm file?

    2
    0 Votes
    2 Posts
    1k Views
    sierdzioS
    Take a look at: "QTranslator":http://developer.qt.nokia.com/doc/qt-4.8/qtranslator.html first code snippet shows how to modify main routine "QML internationalisation":http://doc.qt.nokia.com/4.7-snapshot/qdeclarativei18n.html
  • Stylesheet: linking custom fonts

    6
    0 Votes
    6 Posts
    11k Views
    K
    Chuck, I think it's important to know whether QT C++ uses True Type Fonts already installed in the user's computer or if we can deploy our chosen TTF, to be used in a computer that doesn't have this TTF previously installed. It seems a stupid doubt, but QT docs aren't clear enough - specially for beginners, like me. I don't know if I can use a specially designed personal TTF in my software (it would make my life easier, by using only Text Classes) or if I have to use bitmap images to get the exact text design I want in all plataforms. As there are differences about TTF handling in Linux... and also because sometimes we need to use a special TTF in our programs, TTF deployment without the need to install a new font in the target computer would be a very useful feature to me. I don't want to use QML - I am too old to learn a new language. In my old times, C++ was tough enough to be learned and in the present, I confess that QT libraries are being almost too much to be explored by a STL-er. :) What can you and other experts say about? (Please, forgive my awful english. It is not my mother language) Valdemar Katayama Kjaer Brazil [quote author="Chuck Gao" date="1306668207"]Try QFontDatabase from Qt C++ or FontLoader from QML :) Try: @int QFontDatabase::addApplicationFont ( const QString & fileName ) [static] QStringList QFontDatabase::applicationFontFamilies ( int id ) [static]@ @import QtQuick 1.0 Column { FontLoader { id: fixedFont; name: "Courier" } FontLoader { id: webFont; source: "http://www.mysite.com/myfont.ttf" } Text { text: "Fixed-size font"; font.family: fixedFont.name } Text { text: "Fancy font"; font.family: webFont.name } }@[/quote]
  • How to wait on read and close event simultaneously on QTcpSocket

    17
    0 Votes
    17 Posts
    11k Views
    A
    Thanks for your qucik reply. As of now I have coded the way suggested by you. But my confusion is , if readyRead signal is calling the slot then which thread will call this slot Is this a worker thread or the GUI thread(main app thread) ? My main app is creating multiple thread and I am creating one socket in each thread and registering readyRead() signal in each thread with some slot in that thread class only. If I am printing thread id in the slot it is giving same as GUI thread id. It means only GUI thread is calling this slots, ideally it should be worker thread, otherwise what is the point of using worker thread. One more doubt is this SLOT is unique call back for the entire app, ot will be different for each thread class.??
  • [SOLVED] Getting Necessitas to work?

    8
    0 Votes
    8 Posts
    10k Views
    ?
    It appears that there might be some problem with the version of ant provided with Necessitas, at least in my case (windows 7 x64), for some reason nothing made it work until I installed winant in the same location. That fixed it right away. Also I had no luck with the "read information from application" feature that is supposed to scan which modules of Qt are needed, ain't working both in the office and at home, have to manually select the Qt libraries used by the project. EDIT: After toying with Necessitas the last few days under both Windows and Ubunty my conclusion is the majority of issues lie within ant. It just plainly sucks, its performance, its stability, the very act of actually working as intended... I've had a ton of stock Qt examples and personal code that failed miserably to deploy on the simulator while the actual APK files installed and ran flawlessly on my Transformer TF101. Ironically, it is exactly ant that has the audacity to ask for donations "in case I liked it"... well no, I didn't like it at all... A friendly advice - deploy on an actual device and don't even bother with ant for the time being.
  • QTreeView drag & drop issue

    5
    0 Votes
    5 Posts
    4k Views
    G
    [quote author="Marcus Frenkel" date="1328951033"] What's the use of QStandardItem::setDropEnabled then? When this is set to false the item still accepts drops.[/quote] Sorry, I don't know that. We never used the standard item models in our projects together with DnD.
  • Automatic resizing of window

    2
    0 Votes
    2 Posts
    2k Views
    K
    welcome to devnet Is the slot shrink() activated by the singleShot? Since there might be timing issue, you might want to give a bit more time before firing the shot.
  • [solved] Extracting information from a password protected web page.

    15
    0 Votes
    15 Posts
    8k Views
    M
    After monitoring http request with the help off google chrome I see that a http post request is made by a script.I see that it’s initiator is game.js:17 (a javascript).Can I make a http request to that script or how can I do it?Is it necessary to use XMLHttpRequest?The scripts takes a user and a password and returns a form and there is some information in that form that I need to login.
  • [SOLVED]How to handle our own signals and slot.

    7
    0 Votes
    7 Posts
    5k Views
    S
    kinjalp and xfreax thanx 4 ur reply, i will surely try this and let u know..
  • Widgets promoting

    3
    0 Votes
    3 Posts
    2k Views
    D
    Thank you for you answer. So, as I understood, I'd better re-implement the widget and put in all properties, what I want, than I'd promote it. Am I right?
  • QString and int or double check

    2
    0 Votes
    2 Posts
    11k Views
    L
    @ bool isNumeric = false; foreach(const QString &string, str) { string.toDouble(&isNumeric); // if you need support for the thousands // group seperator use QLocale::toDouble() if(isNumeric == true) { ... } } @ Brain to terminal. Not tested.
  • Update on earlier post - custom widget as an QItemDelegate

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Trying to cast QPointer<Type1> to QPointer<Type2> with no joy

    7
    0 Votes
    7 Posts
    6k Views
    P
    You're welcome :)