Important: Please read the Qt Code of Conduct -

[SOLVED]Have a really weird... error, I guess to call it.

  • !!

    So, I'm not really sure what is causing this and would like some help! :)

    EDIT: I also have a similar problem and I assume it will be solved the same way, but this is also happening:


  • Hi,
    Did you set a stylesheet somewhere? The stylesheet of the parent is copied to the children.

  • I'm not really sure what a stylesheet is. How can I check if I did?

  • If you don't know what it is, you probably didn't use it ;-)
    The manually lineEdit might also be readonly, Or maybe your parent widget is not enable, thus blocking all other widgets, or is it just this widget that is wrong?
    Does the problem also occur when you make a new project and place e.g. a label, a lineEdit and a pushbutton on it?

  • No it's only in this project and I have other buttons that are not affected as well. How do I check if it is read-only? I couldn't find it in the bottom right of the program.

    Sorry if this is hard, I am new to Qt. :/

  • any way, can you post some more code here please as the settings that you have done are fine. now have you ever set one of this parameters?

    if yes, then keep in mind that this affect the main window title. if not....then is something else that we have to see the code.
    for the QLineEdit. did you use setEnabled(false) in your code??
    again some more code will bring a more accurate answer to your problem

  • This is what is in my main.cpp, but I never used any of those.

    @#include "streamwindow.h"
    #include "livestreamer.h"
    #include <QApplication>
    #include <QString>
    #include <QWidget>
    #include <string>
    #include <cstdlib>
    #include <QtGui/QIcon>

    using namespace std;

    int main(int argc, char *argv[]){

    QApplication a(argc, argv);
    streamwindow w;
    QIcon icon(":/stuff/twitch_final.png");
    return a.exec&#40;&#41;;


    I also found out something interesting. When ever I change anything in the GUI editor it didn't change when I ran the program. Can you get any information from that?

    ! :/)!

  • ok.. for me it seams a broken link between the class generated from ui editor and the actual code... can you give the content of your pro file?

  • @#-------------------------------------------------

    Project created by QtCreator 2014-08-11T21:08:45


    QT += core gui

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    TARGET = Twitch
    TEMPLATE = app

    SOURCES += main.cpp

    HEADERS += streamwindow.h

    FORMS += streamwindow.ui

    ../../../../../Users/RAC/Desktop/C++ stuff/icons/twitch.jpg
    ../../../../../../Users/RAC/Desktop/C++ stuff/icons/twitch.jpg


    static { # everything below takes effect with CONFIG += static
    CONFIG += static
    CONFIG += staticlib # this is needed if you create a static library, not a static executable
    message("~~~ static build ~~~") # this is for information, that the static build is done
    mac: TARGET = $$join(TARGET,,,_static) #this adds an _static in the end, so you can seperate static build from non static build
    win32: TARGET = $$join(TARGET,,,_full) #this adds an s in the end, so you can seperate static build from non static build

    Here it is.

  • Try to comment out everything after forms and then run Clean All then QMake and rebuild everything. Also on the streamwindow.cpp look for u I _ stream window.h
    And on the farm editor check the code generated there or add a new class and copy to code from there and try to run or without the auto generated one

  • I finally fixed the problem, thank you for taking so much time to help me! :)

    I had to disable "shadow builds" in the projects tab.

  • So the problem was the auto generated files from the shadow. Can you edit your first post with [SOLVED] on order for others to know that this is solved.

Log in to reply